File numerics/src/tools/NSSTools.h

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

Defines

min(a, b)#
max(a, b)#

Functions

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

Search for the max.

element of a vector

Parameters:
  • x[in] the vector

  • sol[inout] the solution, value of the greatest element of x

  • n[in] 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[in] the vector

  • sol[inout] solution, value of the smallest element of x

  • n[in] 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[in] size of x

  • x[in] the vector

  • x_plus[out] solution vector of positive part values of x components

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

Absolute values of the components of a vector.

Parameters:
  • x[in] the vector

  • sol[inout] solution, vector of absolute values of x components

  • n[in] 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 sortsn_(int *ddl_i, int *sort, int *n)#