Function LIN_dasdennis

Function Documentation

int LIN_dasdennis(int dim, int npart, void *result, int nexist, double scale, double *dir)

Allocate memory and compute Das & Dennis points.

Description

It will re-alloc the exiting array pointer pointed to by result (this must be a NULL pointer if no pre-existing points are given) and return the new number of points. Note that if there are no pre-existing points, the pointer pointed to by result must be NULL and nexist must be 0. Optionally the points can be scaled (with 0 < scale <= 1) and shifted in the direction of a given point back onto the reference hyperplane. This is not done if dir == NULL or scale == 1. A previously allocated result will be de-allocated in case of error.

Parameters
  • dim – dimension

  • npart – Number of partitions

  • result – List of existing points to extend

  • nexist – Number of existing points

  • scale – Scaling factor

  • dir – Direction vector

Returns

Number of points allocated, -1 on error