Back to index

texmacs  1.0.7.15
poly_line.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : poly_line.hpp
00004 * DESCRIPTION: Poly lines
00005 * COPYRIGHT  : (C) 2012  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #include "tree.hpp"
00013 
00014 typedef array<double> point;
00015 typedef array<point> poly_line;
00016 typedef array<poly_line> contours;
00017 
00018 point operator -  (point p);
00019 point operator +  (point p1, point p2);
00020 point operator -  (point p1, point p2);
00021 point operator *  (double x, point p );
00022 point operator /  (point  p, double x);
00023 bool  operator == (point p1, point p2);
00024 
00025 double l2_norm (point p);
00026 double min (point p);
00027 double max (point p);
00028 double inner (point p, point q);
00029 double distance (point p, point q);
00030 point project (point p, point q1, point q2);
00031 double distance (point p, point q1, point q2);
00032 point inf (point p, point q);
00033 point sup (point p, point q);
00034 
00035 double distance (point p, poly_line pl);
00036 bool nearby (point p, poly_line pl);
00037 point inf (poly_line pl);
00038 point sup (poly_line pl);
00039 poly_line operator + (poly_line pl, point p);
00040 poly_line operator - (poly_line pl, point p);
00041 poly_line operator * (double x, poly_line pl);
00042 poly_line normalize (poly_line pl);
00043 double length (poly_line pl);
00044 point access (poly_line pl, double t);
00045 array<double> vertices (poly_line pl);
00046 
00047 double distance (point p, contours pl);
00048 bool nearby (point p, contours pl);
00049 point inf (contours pl);
00050 point sup (contours pl);
00051 contours operator + (contours pl, point p);
00052 contours operator - (contours pl, point p);
00053 contours operator * (double x, contours pl);
00054 contours normalize (contours pl);
00055 void invariants (contours gl, int level,
00056                  array<tree>& disc, array<double>& cont);