fastjet 2.4.3
Classes | Defines | Functions

Voronoi.hh File Reference

#include "fastjet/ClusterSequenceWithArea.hh"
#include <vector>
#include <math.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for Voronoi.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Point
 class to handle a 2d point More...
class  GraphEdge
 handle an edge of the Voronoi Diagram. More...
class  Site
 structure used both for particle sites and for vertices. More...
class  Freenode
class  FreeNodeArrayList
class  Freelist
class  Edge
class  Halfedge
class  VoronoiDiagramGenerator

Defines

#define DELETED   -2
#define le   0
#define re   1

Functions

double norm (const Point p)
 norm of a vector
double vector_product (const Point &p1, const Point &p2)
 2D vector product
double scalar_product (const Point &p1, const Point &p2)
 scalar product
int scomp (const void *p1, const void *p2)

Define Documentation

#define DELETED   -2
#define le   0
#define re   1

Function Documentation

double norm ( const Point  p) [inline]

norm of a vector

Definition at line 107 of file Voronoi.hh.

References Point::x, and Point::y.

Referenced by ClusterSequence::_bj_set_jetinfo(), JadeBriefJet::init(), and EECamBriefJet::init().

                                 {
  return p.x*p.x+p.y*p.y;
}
double scalar_product ( const Point p1,
const Point p2 
) [inline]

scalar product

Definition at line 119 of file Voronoi.hh.

References Point::x, and Point::y.

                                                              {
  return p1.x*p2.x+p1.y*p2.y;
}
int scomp ( const void *  p1,
const void *  p2 
)

Definition at line 1042 of file Voronoi.cc.

References Point::x, and Point::y.

Referenced by VoronoiDiagramGenerator::generateVoronoi().

{
  Point *s1 = (Point*)p1, *s2=(Point*)p2;
  if(s1->y < s2->y) return(-1);
  if(s1->y > s2->y) return(1);
  if(s1->x < s2->x) return(-1);
  if(s1->x > s2->x) return(1);
  return(0);
}
double vector_product ( const Point p1,
const Point p2 
) [inline]

2D vector product

Definition at line 113 of file Voronoi.hh.

References Point::x, and Point::y.

                                                              {
  return p1.x*p2.y-p1.y*p2.x;
}