Example #1
0
int main() {
  int shook_array[kArraySize] = {};
  RandomizeArray(shook_array, kArraySize);

  ArraySorter<int, QuickSort> sorter(shook_array, kArraySize);
  sorter.Run();
  sorter.PrintResult();

  return 0;
}
Example #2
0
void LCPPolyDist<Dimension,FVector,DVector>::GenerateHalfSpaceDescription (
    int numPoints, DVector* points, int numFaces, ITuple* faces, DVector* A,
    double* B)
{
    WM5_LCPPOLYDIST_FUNCTION(RandomizeArray(numPoints, points));
    WM5_LCPPOLYDIST_FUNCTION(LogVertices(numPoints, points));

    ComputeHalfspaces(numPoints, points, numFaces, faces, A, B);

    WM5_LCPPOLYDIST_FUNCTION(LogHalfspaces(numFaces, A, B));
}
	// always produces the same pseudo-random sequence
NoiseSource::NoiseSource(const unsigned int InputSize)
{
  int i;

  NoiseArray = new int[InputSize];
  ArraySize = InputSize;
  SRand(2542);
  for(i=0; i < ArraySize; i++)
    NoiseArray[i] = i;
  for(i=0; i < 20; i++)
    RandomizeArray();
}