QHV
Compute HyperVolumes sequentially
 All Data Structures Files Functions Variables Macros
point.h File Reference

Simple point interface. Contains simple point manipulation functions. More...

#include <stdio.h>
#include <math.h>
#include <float.h>
#include "emmintrin.h"
#include "macros.h"
#include "pointStruct.h"
Include dependency graph for point.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define Eps   0.0000000001
 
#define equal(A, B, I)   (fabs((A)->x[I] - (B)->x[I]) < Eps)
 
#define objective(Z, A, O)   HV(Z, A)
 

Functions

void parsePoint (char *S, point *p, double max)
 
void randomPoint (point *p)
 
 while (i< D)
 
 if (V[1]< V[0]) V[0]
 

Variables

point cZero
 
point cOne
 
static pointpvt
 
static point unsigned int oct
 
static point unsigned int pointzero
 
int i = 0
 
 B = 1
 
static point unsigned int pointone
 
static pointa
 
 res = 0
 
__m128d * o = (__m128d*)&(one->x[0])
 
__m128d * z = (__m128d*)&(zero->x[0])
 
double * V = (double*) &c
 A volume value for every dimension + 1.
 
int d = 0
 
 c = _mm_set1_pd(1)
 
static pointpt
 
__m128d s
 
__m128d * p = (__m128d*)&(pt->x[0])
 
static pointA
 
__m128d * b = (__m128d*)&(B->x[0])
 
__m128d * r = (__m128d*)&(res->x[0])
 

Detailed Description

Simple point interface. Contains simple point manipulation functions.

Date
Mon Nov 28 14:39:12 2011

Definition in file point.h.

Macro Definition Documentation

#define equal (   A,
  B,
 
)    (fabs((A)->x[I] - (B)->x[I]) < Eps)
Parameters
AFirst point
BSecond point
icoordinate to compare
Returns
True if the i coordinates are almost equal

Definition at line 74 of file point.h.

#define objective (   Z,
  A,
 
)    HV(Z, A)
Parameters
ZThe zero bounding point
AThe point to analyze
OThe one bounding point
Returns
The objective value to maximize, must be > 0

Definition at line 83 of file point.h.

Function Documentation

void parsePoint ( char *  S,
point p,
double  max 
)

Reads a point from the '\0' terminated string.

Parameters
SThe string containing the coordinates, separated by spaces or '
'
pThe position where to store the point

Definition at line 58 of file point.c.

void randomPoint ( point p)

Sets p to a random point in [0,1]

Parameters
pThe point to alter

Definition at line 75 of file point.c.

Variable Documentation

a
Initial value:
{
unsigned int res

Definition at line 146 of file point.h.

point cOne

The all 1's point

Definition at line 46 of file point.c.

point cZero

The origin point

Definition at line 45 of file point.c.

static point point * one
Initial value:
{
unsigned int B

Definition at line 121 of file point.h.

point unsigned int point* zero
Initial value:
{
unsigned int B

Definition at line 102 of file point.h.