Simple point interface. Contains simple point manipulation functions.
More...
#include <stdio.h>
#include <math.h>
#include <float.h>
#include "emmintrin.h"
#include "macros.h"
Go to the source code of this file.
|
struct | point |
| Point is an array of coordinates, in a struct for simple and fast copy. More...
|
|
|
#define | D 6 |
|
#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) |
|
|
point | cZero |
|
point | cOne |
|
static point * | pvt |
|
static point unsigned int | oct |
|
static point unsigned int point * | zero |
|
int | i = 0 |
|
| B = 1 |
|
static point unsigned int point * | one |
|
static point * | a |
|
| 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 point * | pt |
|
__m128d | s |
|
__m128d * | p = (__m128d*)&(pt->x[0]) |
|
static point * | A |
|
__m128d * | b = (__m128d*)&(B->x[0]) |
|
__m128d * | r = (__m128d*)&(res->x[0]) |
|
static int | n |
|
static int int | j |
|
| t = idx[n] |
|
| idx [n] = idx[j] |
|
Simple point interface. Contains simple point manipulation functions.
- Author
- Luis Russo <lsr-ThinkPad-X201>
- Date
- Mon Nov 28 14:39:12 2011
Definition in file point.h.
< Accept compiler options The number of dimensions
Definition at line 49 of file point.h.
#define equal |
( |
|
A, |
|
|
|
B, |
|
|
|
I |
|
) |
| (fabs((A)->x[I] - (B)->x[I]) < Eps) |
- Parameters
-
A | First point |
B | Second point |
i | coordinate to compare |
- Returns
- True if the i coordinates are almost equal
Definition at line 87 of file point.h.
#define objective |
( |
|
Z, |
|
|
|
A, |
|
|
|
O |
|
) |
| HV(Z, A) |
- Parameters
-
Z | The zero bounding point |
A | The point to analyze |
O | The one bounding point |
- Returns
- The objective value to maximize, must be > 0
Definition at line 96 of file point.h.
void parsePoint |
( |
char * |
S, |
|
|
point * |
p, |
|
|
double |
max |
|
) |
| |
Reads a point from the '\0' terminated string.
- Parameters
-
S | The string containing the coordinates, separated by spaces or '
' |
p | The position where to store the point |
Definition at line 57 of file point.c.
void randomPoint |
( |
point * |
p | ) |
|
Sets p to a random point in [0,1]
- Parameters
-
Definition at line 74 of file point.c.
Initial value:
Definition at line 159 of file point.h.
The all 1's point
Definition at line 45 of file point.c.
The origin point
Definition at line 44 of file point.c.
Initial value:
Definition at line 315 of file point.h.
Initial value:
Definition at line 134 of file point.h.
Initial value:
Definition at line 115 of file point.h.