Overview | Modules | Class Hierarchy | Classes | Members

Classes | Typedefs | Functions
Basic

## Classes

- struct tlp::Array< Obj, SIZE >
    Fixed-size array encapsulation. In debug mode, a bound check is performed at each access. More...
- struct tlp::Circle< Obj >
    class for circle More...
- class tlp::VoronoiDiagram
- class tlp::Matrix< Obj, SIZE >
    class for mathematical square matrix More...
- struct tlp::Rectangle< Obj >
    class for rectangle More...
- class tlp::Vector
    class for mathematical vector More...
- class tlp::VectorCast
    class for mathematical vector More...

## Typedefs

- typedef Vector< unsigned int, 2 > tlp::Vec2ui
    typedef for 2D vector of unsigned int
- typedef Vector< unsigned int, 3 > tlp::Vec3ui
    typedef for 3D vector of unsigned int
- typedef Vector< unsigned int, 4 > tlp::Vec4ui
    typedef for 4D vector of unsigned int
- typedef Vector< int, 2 > tlp::Vec2i
    typedef for 2D vector of int
- typedef Vector< int, 3 > tlp::Vec3i
    typedef for 3D vector of int
- typedef Vector< int, 4 > tlp::Vec4i
    typedef for 4D vector of int
- typedef Vector< double, 2 > tlp::Vec2d
    typedef for 2D vector of double
- typedef Vector< double, 3 > tlp::Vec3d
    typedef for 3D vector of double
- typedef Vector< double, 4 > tlp::Vec4d
    typedef for 4D vector of double
- typedef Vector< float, 2 > tlp::Vec2f
    typedef for 2D vector of float
- typedef Vector< float, 3 > tlp::Vec3f
    typedef for 3D vector of float
- typedef Vector< float, 4 > tlp::Vec4f
    typedef for 4D vector of float

## Functions

- template<typename Obj , unsigned int SIZE> std::ostream & tlp::operator<< (std::ostream &os, const Array< Obj, SIZE > &array)
- template<typename Obj , unsigned int SIZE> std::istream & tlp::operator>> (std::istream &is, Array< Obj, SIZE > &)
- template<typename Obj > bool tlp::intersection (const Circle< Obj > &c1, const Circle< Obj > &c2, Vector< Obj, 2 > &sol1, Vector< Obj, 2 > &sol2)
- template<typename Obj > Circle< Obj > tlp::enclosingCircle (const Circle< Obj > &, const Circle< Obj > &)
- template<typename Obj > Circle< Obj > tlp::enclosingCircle (const std::vector< Circle< Obj > > &circles)
- template<typename Obj > Circle< Obj > tlp::lazyEnclosingCircle (const std::vector< Circle< Obj > > &circles)
- template<typename Obj > std::ostream & tlp::operator<< (std::ostream &os, const Circle< Obj > &)
- TLP_SCOPE void tlp::convexHull (const std::vector< Coord > &points, std::vector< unsigned int > &convexHull)
    function for convex hull manipulation
- TLP_SCOPE void tlp::mergeHulls (const std::vector< Coord > &points, const std::vector< unsigned int > &hull1, const std::vector< unsigned int > &hull2, std::vector< unsigned int > &mergedConvexHull)
- TLP_SCOPE void tlp::intersectHulls (std::vector< Coord > &points, const std::vector< unsigned int > &hull1, const std::vector< unsigned int > &hull2, std::vector< unsigned int > &intersection)
- TLP_SCOPE double tlp::areaOfHull (const std::vector< Coord > &points, const std::vector< unsigned int > &hull)
- TLP_SCOPE bool tlp::insideHull (const std::vector< Coord > &points, const std::vector< unsigned int > &hull, const Coord &point)
- TLP_SCOPE bool tlp::delaunayTriangulation (std::vector< Coord > &points, std::vector< std::pair< unsigned int, unsigned int > > &edges, std::vector< std::vector< unsigned int > > &simplices, bool voronoiMode=false)
    functions for Delaunay Triangulations
- TLP_SCOPE bool tlp::voronoiDiagram (std::vector< Coord > &sites, VoronoiDiagram &voronoiDiagram)
- template<typename Obj , unsigned int SIZE> MATRIX tlp::operator+ (const MATRIX &mat1, const MATRIX &mat2)
- template<typename Obj , unsigned int SIZE> MATRIX tlp::operator- (const MATRIX &mat1, const MATRIX &mat2)
- template<typename Obj , unsigned int SIZE> MATRIX tlp::operator* (const MATRIX &mat, const Obj &obj)
- template<typename Obj , unsigned int SIZE> MATRIX tlp::operator* (const MATRIX &mat1, const MATRIX &mat2)
- template<typename Obj , unsigned int SIZE> Vector< Obj, SIZE > tlp::operator* (const Vector< Obj, SIZE > &vec, const tlp::Matrix< Obj, SIZE > &)
- template<typename Obj , unsigned int SIZE> Vector< Obj, SIZE > tlp::operator* (const Matrix< Obj, SIZE > &, const Vector< Obj, SIZE > &vec)
- TEMPLATEVECTOR VECTOR tlp::minVector (const VECTOR &u, const VECTOR &v)
- TEMPLATEVECTOR VECTOR tlp::maxVector (const VECTOR &u, const VECTOR &v)
- TEMPLATEVECTOR VECTOR tlp::operator* (const VECTOR &, const VECTOR &)
- TEMPLATEVECTOR VECTOR tlp::operator* (const TYPE &, const VECTOR &)
- TEMPLATEVECTOR VECTOR tlp::operator* (const VECTOR &, const TYPE &)
- TEMPLATEVECTOR VECTOR tlp::operator+ (const VECTOR &, const VECTOR &)
- TEMPLATEVECTOR VECTOR tlp::operator+ (const VECTOR &, const TYPE &)
- TEMPLATEVECTOR VECTOR tlp::operator- (const VECTOR &, const VECTOR &)
- TEMPLATEVECTOR VECTOR tlp::operator- (const VECTOR &, const TYPE &)
- TEMPLATEVECTOR VECTOR tlp::operator/ (const VECTOR &, const VECTOR &)
- TEMPLATEVECTOR VECTOR tlp::operator/ (const VECTOR &, const TYPE &)
- TEMPLATEVECTOR VECTOR tlp::operator^ (const VECTOR &, const VECTOR &)
- TEMPLATEVECTOR VECTOR tlp::operator- (const VECTOR &)

## Typedef Documentation

typedef Vector<double, 2> tlp::Vec2d

typedef for 2D vector of double

typedef Vector<float, 2> tlp::Vec2f

typedef for 2D vector of float

typedef Vector<int, 2> tlp::Vec2i

typedef for 2D vector of int

typedef Vector<unsigned int, 2> tlp::Vec2ui

typedef for 2D vector of unsigned int

typedef Vector<double, 3> tlp::Vec3d

typedef for 3D vector of double

typedef Vector<float, 3> tlp::Vec3f

typedef for 3D vector of float

typedef Vector<int, 3> tlp::Vec3i

typedef for 3D vector of int

typedef Vector<unsigned int, 3> tlp::Vec3ui

typedef for 3D vector of unsigned int

typedef Vector<double, 4> tlp::Vec4d

typedef for 4D vector of double

typedef Vector<float, 4> tlp::Vec4f

typedef for 4D vector of float

typedef Vector<int, 4> tlp::Vec4i

typedef for 4D vector of int

typedef Vector<unsigned int, 4> tlp::Vec4ui

typedef for 4D vector of unsigned int

## Function Documentation

TLP_SCOPE double tlp::areaOfHull | ( | const std::vector< Coord > & | points,
|  | const std::vector< unsigned int > & | hull
| ) |  |

Computes the area of the convex "hull" which is a list of indexes into the vector of Coord "points".

TLP_SCOPE void tlp::convexHull | ( | const std::vector< Coord > & | points,
|  | std::vector< unsigned int > & | convexHull
| ) |  |

function for convex hull manipulation

Contains functions for computing, merging, intersecting, and testing convex hulls.

Author:
  : Daniel Archambault archam@cs.ubc.ca,

Version:
  0.0.3 26/06/2006 Compute the convex hull and return a list of indexes for the points on the convex hull in counterclockwise order. The convexHull vector is automatically cleared. The algorithm runs in O(nlgn) time.

TLP_SCOPE bool tlp::delaunayTriangulation | ( | std::vector< Coord > & | points,
|  | std::vector< std::pair< unsigned int, unsigned int > > & | edges,
|  | std::vector< std::vector< unsigned int > > & | simplices,
|  | bool | voronoiMode = `false`
| ) |  |

functions for Delaunay Triangulations

Used to triangulate a set of points in the plane

Author:
  : David Auber/Daniel Archambault/Antoine Lambert : auber@tulip-software.org Computes the delaunay triangulation and returns the set of delaunay edges in the vector edges and delaunay simplices (triangles in 2d, tetrahedra in 3d) of the triangulation in the vector simplices. Edges and simplices are defined using a indexes into the original set of points.

template<typename Obj >

Circle<Obj> tlp::enclosingCircle | ( | const std::vector< Circle< Obj > > & | circles | ) |

Compute the optimum enclosing circle of a set of circles.

template<typename Obj >

Circle<Obj> tlp::enclosingCircle | ( | const Circle< Obj > & | ,
|  | const Circle< Obj > & |
| ) |  |

Compute the optimum enclosing circle of 2 circles.

TLP_SCOPE bool tlp::insideHull | ( | const std::vector< Coord > & | points,
|  | const std::vector< unsigned int > & | hull,
|  | const Coord & | point
| ) |  |

Returns true if "point" is inside "hull". Hull is a list of indexes into the vector of Coord "points."

TLP_SCOPE void tlp::intersectHulls | ( | std::vector< Coord > & | points,
|  | const std::vector< unsigned int > & | hull1,
|  | const std::vector< unsigned int > & | hull2,
|  | std::vector< unsigned int > & | intersection
| ) |  |

Intersects two convex hulls using the algorithm of O'Rourke, Chien, Olson, and Naddor, 1982. Code inspired by Computational Geometry in C by Joseph O'Rourke pp 243 -- 251. and code on his website: http://maven.smith.edu/~orourke/books/compgeom.html Provide a full list of points involved in the convex hull computation in "points". The vectors hull1 and hull2 contain a list of indexes into the points vector that define the vertices of the convex hull. The indices corresponding to the points on the intersecting hull are returned in "intersection". Node that several points may be inserted into the "points" list. These points correspond to the points generated when edges of hull1 and hull2 intersect.

template<typename Obj >

bool tlp::intersection | ( | const Circle< Obj > & | c1,
|  | const Circle< Obj > & | c2,
|  | Vector< Obj, 2 > & | sol1,
|  | Vector< Obj, 2 > & | sol2
| ) |  |

Give the instersction of two circles, return false if no intersection exist else put the two points in p1 & p2, if there is only one solution p1 == p2;

template<typename Obj >

Circle<Obj> tlp::lazyEnclosingCircle | ( | const std::vector< Circle< Obj > > & | circles | ) |

Compute an enclosing circle of a set of circles, this algorithm is an aproximation of the smallest enclosing circle.

TEMPLATEVECTOR VECTOR tlp::maxVector | ( | const VECTOR & | u,
|  | const VECTOR & | v
| ) |  | `[inline]`

Return the maximum of each dimension of the two vectors for instance for a 2 vectors of dim 2 : max(V1, V2) = (max(V1[0], v2[0]), max(V1[1], v2[1))

TLP_SCOPE void tlp::mergeHulls | ( | const std::vector< Coord > & | points,
|  | const std::vector< unsigned int > & | hull1,
|  | const std::vector< unsigned int > & | hull2,
|  | std::vector< unsigned int > & | mergedConvexHull
| ) |  |

Merges two convex hulls hull1 and hull2 using the rotating calipers method of Pirzadeh and Touissaint. The mergedConvexHull vector is automatically cleared and the vertices of the hulls must be specified in counter clockwise order. Provide a full list of all points involved in the convex hull computation in the vector points. The vectors hull1 and hull2 contain a list of indexes into the points vector that define the vertices of the convex hull. The indexes into points of the verticies on the merged convex hull are returned in the vector mergedConvexHull.

TEMPLATEVECTOR VECTOR tlp::minVector | ( | const VECTOR & | u,
|  | const VECTOR & | v
| ) |  | `[inline]`

Return the minimun of each dimension of the two vectors for instance for a 2 vectors of dim 2 : min(V1, V2) = (min(V1[0], v2[0]), min(V1[1], v2[1))

template<typename Obj , unsigned int SIZE>

MATRIX tlp::operator* | ( | const MATRIX & | mat,
|  | const Obj & | obj
| ) |  | `[inline]`

Returns a new matrix equal to the multiplication of the matrix by obj

template<typename Obj , unsigned int SIZE>

MATRIX tlp::operator* | ( | const MATRIX & | mat1,
|  | const MATRIX & | mat2
| ) |  | `[inline]`

Returns a new matrix equal to the multiplication of the matrix by another matrix

template<typename Obj , unsigned int SIZE>

Vector<Obj,SIZE> tlp::operator* | ( | const Vector< Obj, SIZE > & | vec,
|  | const tlp::Matrix< Obj, SIZE > & |
| ) |  | `[inline]`

Returns a new vector equal to the multiplication of the vector by a matrix,(the vector is automatically transposed to do the multiplication)

template<typename Obj , unsigned int SIZE>

Vector<Obj,SIZE> tlp::operator* | ( | const Matrix< Obj, SIZE > & | ,
|  | const Vector< Obj, SIZE > & | vec
| ) |  | `[inline]`

Returns a new vector equal to the multiplication of the matrix by a vector

TEMPLATEVECTOR VECTOR tlp::operator* | ( | const VECTOR & | ,
|  | const VECTOR & |
| ) |  | `[inline]`

TEMPLATEVECTOR VECTOR tlp::operator* | ( | const TYPE & | ,
|  | const VECTOR & |
| ) |  | `[inline]`

TEMPLATEVECTOR VECTOR tlp::operator* | ( | const VECTOR & | ,
|  | const TYPE & |
| ) |  | `[inline]`

TEMPLATEVECTOR VECTOR tlp::operator+ | ( | const VECTOR & | ,
|  | const TYPE & |
| ) |  | `[inline]`

TEMPLATEVECTOR VECTOR tlp::operator+ | ( | const VECTOR & | ,
|  | const VECTOR & |
| ) |  | `[inline]`

template<typename Obj , unsigned int SIZE>

MATRIX tlp::operator+ | ( | const MATRIX & | mat1,
|  | const MATRIX & | mat2
| ) |  | `[inline]`

Returns a new matrix equal to the sum of 2 matrices

TEMPLATEVECTOR VECTOR tlp::operator- | ( | const VECTOR & |  | ) | `[inline]`

template<typename Obj , unsigned int SIZE>

MATRIX tlp::operator- | ( | const MATRIX & | mat1,
|  | const MATRIX & | mat2
| ) |  | `[inline]`

Returns a new matrix equal to the difference of 2 matrices

TEMPLATEVECTOR VECTOR tlp::operator- | ( | const VECTOR & | ,
|  | const TYPE & |
| ) |  | `[inline]`

TEMPLATEVECTOR VECTOR tlp::operator- | ( | const VECTOR & | ,
|  | const VECTOR & |
| ) |  | `[inline]`

TEMPLATEVECTOR VECTOR tlp::operator/ | ( | const VECTOR & | ,
|  | const VECTOR & |
| ) |  | `[inline]`

TEMPLATEVECTOR VECTOR tlp::operator/ | ( | const VECTOR & | ,
|  | const TYPE & |
| ) |  | `[inline]`

template<typename Obj , unsigned int SIZE>

std::ostream& tlp::operator<< | ( | std::ostream & | os,
|  | const Array< Obj, SIZE > & | array
| ) |  |

template<typename Obj >

std::ostream& tlp::operator<< | ( | std::ostream & | os,
|  | const Circle< Obj > & |
| ) |  |

Write circle in a stream

template<typename Obj , unsigned int SIZE>

std::istream& tlp::operator>> | ( | std::istream & | is,
|  | Array< Obj, SIZE > & |
| ) |  |

TEMPLATEVECTOR VECTOR tlp::operator^ | ( | const VECTOR & | ,
|  | const VECTOR & |
| ) |  | `[inline]`

TLP_SCOPE bool tlp::voronoiDiagram | ( | std::vector< Coord > & | sites,
|  | VoronoiDiagram & | voronoiDiagram
| ) |  |

Computes the voronoi diagram of a set of points (for 2d and 3d layouts). The set of input points are given in sites. The resultant voronoi diagram is returned in voronoiDiagram. It automatically computes the set of all voronoi vertices, edges and cells. In order to not have to deal with infinite voronoi rays, the input layout is enclosed in its convex hull in 2d or in its bounding box in 3d. It enables to have a connected voronoi cell for each input site.

Tulip Software by LaBRI Visualization Team 2001 - 2012