numerics/src/tools/FischerBurmeister.c
/* Computation of the mixed Fischer-Burmeister function */
Computation of the mixed Fischer-Burmeister function
Computation of the mixed Fischer - Burmeister function
void phi_Mixed_FB(int sizeEq, int sizeIneq, double* restrict z, double* restrict F, double* restrict phiVector)
{
  assert(z != NULL);
  assert(F != NULL);
  assert(phiVector != NULL);
  int totalSize = sizeEq + sizeIneq;
  for(int i = 0 ; i < sizeEq ; ++i)
  {
    phiVector[i] = F[i];
  }
  for(int i = sizeEq ; i < totalSize ; ++i)
  {
    phiVector[i] =  sqrt(z[i] * z[i] + F[i] * F[i]) - (z[i] + F[i]);
  }
}
void phi_Mixed_FB ( int sizeEq , int sizeIneq , double * restrict z , double * restrict F , double * restrict phiVector ) { assert ( z != NULL ) ; assert ( F != NULL ) ; assert ( phiVector != NULL ) ; int totalSize = sizeEq + sizeIneq ; for ( int i = 0 ; i < sizeEq ; ++ i ) { phiVector [ i ] = F [ i ] ; } for ( int i = sizeEq ; i < totalSize ; ++ i ) { phiVector [ i ] = sqrt ( z [ i ] * z [ i ] + F [ i ] * F [ i ] ) - ( z [ i ] + F [ i ] ) ; } }
Computation of the mixed Fischer-Burmeister function
Computation of the mixed Fischer - Burmeister function