File numerics/src/tools/NSSTools.h

Go to the source code of this file

Header to collect basic tools, structures definition or any usefull things for NSSpack.

Header to collect basic tools for integer arrays.

Functions

void abs_part(double *x, double *sol, int n)

Absolute values of the components of a vector.

Parameters
  • x: the vector
  • sol: solution, vector of absolute values of x components
  • n: size of x

void diffns(int *na, int *a, int *nb, int *b, int *nc, int *c)

Input na, a, nb, b Output nc, c a and b: interger vectors in increasing order c : vector of integers of a that are not in b.

void max_part(double *x, double *sol, int n)

Search for the max.

element of a vector

Parameters
  • x: the vector
  • sol: the solution, value of the greatest element of x
  • n: size of x

void maxf(double *a, double *b, double *c)

compare two double a and b, and return the max.

Parameters
  • a: double*
  • b: double*
  • c: double*, the max

void min_part(double *x, double *sol, int n)

Search for the min.

element of a vector

Parameters
  • x: the vector
  • sol: solution, value of the smallest element of x
  • n: size of x

void minf(double *a, double *b, double *c)

compare two double a and b, and return the min.

Parameters
  • a: double*
  • b: double*
  • c: double*, the min

void pos_part(unsigned n, double *x, double *x_plus)

Positive part values of the components of a vector.

Parameters
  • n: size of x
  • x: the vector
  • x_plus: solution vector of positive part values of x components

void sortsn_(int *ddl_i, int *sort, int *n)