Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

gul Namespace Reference


Compounds

class  gul::AllocError
struct  gul::bounding_box
struct  gul::curve
class  gul::debug_streambuf
class  gul::dump_curve
class  gul::dump_defaults
class  gul::dump_line
class  gul::dump_list
class  gul::dump_matrix
class  gul::dump_point
class  gul::dump_surf
class  gul::dump_vector
class  gul::Error
class  gul::hpoint
class  gul::hpoint1
class  gul::hpoint2
class  gul::InternalError
class  gul::IntervalDivZeroError
struct  gul::itriangle
class  gul::kdarray
struct  gul::kdpoint
struct  gul::knot_vec
struct  gul::line
struct  gul::line2
class  gul::List
class  gul::List2
class  gul::ListNode
struct  gul::ListNodeInfo
struct  gul::Map
struct  gul::mat4x4
struct  gul::Map::Node
class  gul::pool_bytealloc
class  gul::pool_object
class  gul::poolalloc
struct  gul::poolalloc::rebind
class  gul::poolalloc< void >
struct  gul::poolalloc< void >::rebind
struct  gul::RefMap::Node
class  gul::point
class  gul::point1
class  gul::point2
struct  gul::point_net
struct  gul::point_vec
struct  gul::polyline
class  gul::PoolAllocError
class  gul::pooldeque
class  gul::poolmap
class  gul::poolstack
class  gul::Ptr
union  gul::ptr_int_union
struct  gul::Ptr::Ptr_rep
struct  gul::RefMap
struct  gul::rtr
struct  gul::rtr< double >
struct  gul::rtr< float >
struct  gul::rtr< guar::rational >
struct  gul::rtr< int >
struct  gul::rtr< unsigned int >
class  gul::SingularMatrixError
struct  gul::Stack
class  gul::streambufrec
struct  gul::surface
struct  gul::triangle
struct  gul::triangle2
class  gul::vec4

Typedefs

typedef basic_string< char,
char_traits< char >, gul::poolalloc<
char > > 
poolstring
typedef unsigned long long uint64
typedef long long int64
typedef unsigned long uint32
typedef long int32
typedef int sub_range [2]

Enumerations

enum  dump_format { human_readable = 0, gul_format }
enum  dump_point_format { homogeneous = 0, euclidian, mixed }
enum  DomainDirection { u_direction, v_direction }

Functions

template<> int test (const guar::rational &a)
template<> int compare (const guar::rational &A, const guar::rational &B)
std::ostream & operator<< (std::ostream &s, const guar::rational &r)
template<class X, class A> void Assert (A assertion)
template<class T> bool rel_equal (const T &a, const T &b, const T &eps)
template<class T> bool rel_equal (const gul::hpoint< T > &a, const gul::hpoint< T > &b, const T &eps)
template<class T> bool rel_equal (const gul::hpoint2< T > &a, const gul::hpoint2< T > &b, const T &eps)
template<class T> bool rel_equal (const gul::hpoint1< T > &a, const gul::hpoint1< T > &b, const T &eps)
template<class T> bool rel_equal (const gul::point< T > &a, const gul::point< T > &b, const T &eps)
template<class T> bool rel_equal (const gul::point2< T > &a, const gul::point2< T > &b, const T &eps)
template<class T> bool rel_equal (const gul::point1< T > &a, const gul::point1< T > &b, const T &eps)
template<class T> T max_norm (const point< T > &a)
template<class T> T max_norm (const point2< T > &a)
template<class T> bool zero_sine (const point< T > &ina, const point< T > &inb, const T &eps)
template<class T> bool zero_sine (const point2< T > &ina, const point2< T > &inb, const T &eps)
template<class T> bool abs_equal (const T &a, const T &b, const T &eps)
template<class T> bool abs_equal (const gul::hpoint< T > &a, const gul::hpoint< T > &b, const T &eps)
template<class T> bool abs_equal (const gul::hpoint2< T > &a, const gul::hpoint2< T > &b, const T &eps)
template<class T> bool abs_equal (const gul::hpoint1< T > &a, const gul::hpoint1< T > &b, const T &eps)
template<class T> bool abs_equal (const gul::point< T > &a, const gul::point< T > &b, const T &eps)
template<class T> bool abs_equal (const gul::point2< T > &a, const gul::point2< T > &b, const T &eps)
template<class T> bool abs_equal (const gul::point1< T > &a, const gul::point1< T > &b, const T &eps)
template<class EP> std::ostream & operator<< (std::ostream &os, const gul::dump_point< EP > &P)
template<class T> ostream & operator<< (ostream &s, const point1< T > &p)
template<class T> ostream & operator<< (ostream &s, const hpoint1< T > &p)
template<class T> ostream & operator<< (ostream &s, const point2< T > &p)
template<class T> ostream & operator<< (ostream &s, const hpoint2< T > &p)
template<class T> ostream & operator<< (ostream &s, const point< T > &p)
template<class T> ostream & operator<< (ostream &s, const hpoint< T > &p)
template<class EP, class L> ostream & operator<< (ostream &os, const dump_line< EP, L > &l)
template<class T> ostream & operator<< (ostream &os, const line< T > &l)
template<class T> ostream & operator<< (ostream &os, const line2< T > &l)
template<class T> ostream & operator<< (ostream &os, const dump_list< T > &L)
template<class T, class HP> ostream & operator<< (ostream &os, const dump_surf< T, HP > &s)
template<class T, class HP> ostream & operator<< (ostream &os, const dump_curve< T, HP > &c)
template<class HP> ostream & operator<< (ostream &os, const dump_matrix< HP > &m)
template<class HP> ostream & operator<< (ostream &os, const dump_vector< HP > &m)
template<class T> mat4x4< T > operator * (mat4x4< T > a, mat4x4< T > b)
template<class T, class T2> void MCopy (int m, int n, const Ptr< Ptr< T2 > > &A, Ptr< Ptr< T > > &C)
template<class T, class T2> void MCopy (int m, int n, const Ptr< Ptr< T2 > > &A, Ptr< T > &C)
template<class T, class T2> void MCopy (int m, int n, const Ptr< T2 > &A, Ptr< Ptr< T > > &C)
template<class T> void MMProduct (int r, int s, int t, Ptr< Ptr< T > > &A, Ptr< Ptr< T > > &B, Ptr< Ptr< T > > &C)
template<class T> void MMProduct (int r, int s, int t, Ptr< T > &A, Ptr< T > &B, Ptr< T > &C)
template<class T> vec4< T > operator * (mat4x4< T > a, vec4< T > b)
template<class T> void MVProduct (int n, int m, Ptr< Ptr< T > > &A, Ptr< T > &x, Ptr< T > &b)
template<class T> void VMProduct (int n, int m, const Ptr< T > &x, const Ptr< Ptr< T > > &A, Ptr< T > &b)
template<class T> void VMProduct (int n, int m, const Ptr< T > &x, const Ptr< T > &A, Ptr< T > &b)
template<class T> vec4< T > operator * (vec4< T > b, mat4x4< T > a)
template<class T> void CubeVerts (const T &xmin, const T &xmax, const T &ymin, const T &ymax, const T &zmin, const T &zmax, vec4< T > *v)
template<class T> void CubeVerts (const T &xmin, const T &xmax, const T &ymin, const T &ymax, const T &zmin, const T &zmax, point< T > *v)
template<class T> void CubeVerts (const Ptr< T > &bb, Ptr< point< T > > &v)
template<class T> int compare (const T &a, const T &b)
template<class T> int test (const T &a)
template<class T> T Max (const T &a, const T &b)
template<class T> T Min (const T &a, const T &b)
template<class T> T Max (const T &a, const T &b, const T &c)
template<class T> T Min (const T &a, const T &b, const T &c)
template<class T> void Swap (T &a, T &b)
template<class T> T Square (const T &a)
template<class T> T Sign (const T &a, const T &b)
template<class T> bool operator== (const poolalloc< T > &, const poolalloc< T > &) throw ()
template<class T> bool operator!= (const poolalloc< T > &, const poolalloc< T > &) throw ()
template<class T> void set (hpoint< T > &c, T a)
template<class T> hpoint< T > operator+ (const hpoint< T > &a, const hpoint< T > &b)
template<class T> hpoint< T > operator- (const hpoint< T > &a)
template<class T> hpoint< T > operator- (const hpoint< T > &a, const hpoint< T > &b)
template<class T> hpoint< T > operator * (const T op, const hpoint< T > &a)
template<class T> T operator * (const hpoint< T > &a, const hpoint< T > &b)
template<class T> point< T > euclid (const hpoint< T > &a)
template<class T> T weight (const hpoint< T > &a)
template<class T> void set (hpoint2< T > &c, T a)
template<class T> hpoint2< T > operator+ (const hpoint2< T > &a, const hpoint2< T > &b)
template<class T> hpoint2< T > operator- (const hpoint2< T > &a)
template<class T> hpoint2< T > operator- (const hpoint2< T > &a, const hpoint2< T > &b)
template<class T> hpoint2< T > operator * (const T op, const hpoint2< T > &a)
template<class T> T operator * (const hpoint2< T > a, const hpoint2< T > &b)
template<class T> point2< T > euclid (const hpoint2< T > &a)
template<class T> T weight (const hpoint2< T > &a)
template<class T> void set (hpoint1< T > &c, T a)
template<class T> hpoint1< T > operator+ (const hpoint1< T > &a, const hpoint1< T > &b)
template<class T> hpoint1< T > operator- (const hpoint1< T > &a)
template<class T> hpoint1< T > operator- (const hpoint1< T > &a, const hpoint1< T > &b)
template<class T> hpoint1< T > operator * (const T op, const hpoint1< T > &a)
template<class T> T operator * (const hpoint1< T > &a, const hpoint1< T > &b)
template<class T> point1< T > euclid (const hpoint1< T > &a)
template<class T> T weight (const hpoint1< T > &a)
template<class T> void set (point< T > &c, T a)
template<class T> point< T > operator+ (const point< T > &a, const point< T > &b)
template<class T> point< T > operator- (const point< T > &a)
template<class T> point< T > operator- (const point< T > &a, const point< T > &b)
template<class T> point< T > operator * (const T op, const point< T > &a)
template<class T> T operator * (const point< T > &a, const point< T > &b)
template<class T> point< T > euclid (const point< T > &a)
template<class T> T weight (const point< T > &a)
template<class T> bool operator!= (const point2< T > &a, const point2< T > &b)
template<class T> void set (point2< T > &c, T a)
template<class T> point2< T > operator+ (const point2< T > &a, const point2< T > &b)
template<class T> point2< T > operator- (const point2< T > &a)
template<class T> point2< T > operator- (const point2< T > &a, const point2< T > &b)
template<class T> point2< T > operator * (const T op, const point2< T > &a)
template<class T> T operator * (const point2< T > &a, const point2< T > &b)
template<class T> point2< T > euclid (const point2< T > &a)
template<class T> T weight (const point2< T > &a)
template<class T> void set (point1< T > &c, T a)
template<class T> point1< T > operator+ (const point1< T > &a, const point1< T > &b)
template<class T> point1< T > operator- (const point1< T > &a)
template<class T> point1< T > operator- (const point1< T > &a, const point1< T > &b)
template<class T> point1< T > operator * (const T op, const point1< T > &a)
template<class T> T operator * (const point1< T > a, const point1< T > &b)
template<class T> point1< T > euclid (const point1< T > &a)
template<class T> T weight (const point1< T > &a)
template<class T> point< T > ortho (const hpoint< T > &a)
template<class T> point2< T > ortho (const hpoint2< T > &a)
template<class T> point1< T > ortho (const hpoint1< T > &a)
template<class T> point< T > ortho (const point< T > &a)
template<class T> point2< T > ortho (const point2< T > &a)
template<class T> point1< T > ortho (const point1< T > &a)
template<class T> point< T > cross_product (const point< T > &a, const point< T > &b)
template<class T> point< T > cross_product (const point2< T > &a, const point2< T > &b)
template<class T> T length (const point< T > &a)
template<class T> T normalize (point< T > *c, const point< T > &a)
template<class T> T normalize (point2< T > *c, const point2< T > &a)
template<class T> T distance (const point< T > &a, const point< T > &b)
template<class T> T distance (const point2< T > &a, const point2< T > &b)
template<class T> T distance (const point1< T > &a, const point1< T > &b)
template<class T> T euclidian_distance (const hpoint< T > &a, const hpoint< T > &b)
template<class T> T euclidian_distance (const hpoint2< T > &a, const hpoint2< T > &b)
template<class T> T euclidian_distance (const hpoint1< T > &a, const hpoint1< T > &b)
template<class T> T euclidian_distance (const point< T > &a, const point< T > &b)
template<class T> T euclidian_distance (const point2< T > &a, const point2< T > &b)
template<class T> T euclidian_distance (const point1< T > &a, const point1< T > &b)
template<class HP> HP ProjectToLine (const HP &S, const HP &T, const HP &P)
 Project a point onto a line (in 3-D). More...


Variables

const bool ndebug = false


Typedef Documentation

typedef long gul::int32
 

Definition at line 140 of file gul_types.h.

typedef long long gul::int64
 

Definition at line 129 of file gul_types.h.

typedef basic_string<char,char_traits<char>,gul::poolalloc<char> > gul::poolstring
 

Definition at line 53 of file gul_std.h.

typedef int gul::sub_range[2]
 

Definition at line 667 of file gul_types.h.

Referenced by gul::Ptr< EP >::realloc().

typedef unsigned long gul::uint32
 

Definition at line 139 of file gul_types.h.

typedef unsigned long long gul::uint64
 

Definition at line 128 of file gul_types.h.


Enumeration Type Documentation

enum gul::DomainDirection
 

Enumeration values:
u_direction 
v_direction 

Definition at line 661 of file gul_types.h.

Referenced by gul::Ptr< EP >::realloc().

00662 {
00663   u_direction,
00664   v_direction
00665 };

enum gul::dump_format
 

Enumeration values:
human_readable 
gul_format 

Definition at line 27 of file gul_io.h.

Referenced by gul::dump_line::dump_line(), gul::dump_point::dump_point(), gul::dump_surf::dump_surf(), and gul::dump_defaults::set_format().

00028 {
00029   human_readable = 0,
00030   gul_format
00031 };

enum gul::dump_point_format
 

Enumeration values:
homogeneous 
euclidian 
mixed 

Definition at line 33 of file gul_io.h.

Referenced by gul::dump_line::dump_line(), gul::dump_point::dump_point(), gul::dump_surf::dump_surf(), and gul::dump_defaults::set_point_format().

00034 {
00035   homogeneous = 0,
00036   euclidian,
00037   mixed
00038 };


Function Documentation

template<class T>
bool abs_equal const gul::point1< T > &    a,
const gul::point1< T > &    b,
const T &    eps
[inline]
 

Definition at line 258 of file gul_float.h.

00260 {
00261   T tol = eps;
00262 
00263   if( !abs_equal(a.x, b.x, tol) ) return false;
00264 
00265   return true;
00266 }

template<class T>
bool abs_equal const gul::point2< T > &    a,
const gul::point2< T > &    b,
const T &    eps
[inline]
 

Definition at line 246 of file gul_float.h.

00248 {
00249   T tol = eps / rtr<T>::root2_2();
00250 
00251   if( !abs_equal(a.x, b.x, tol) ) return false;
00252   if( !abs_equal(a.y, b.y, tol) ) return false;
00253 
00254   return true;
00255 }

template<class T>
bool abs_equal const gul::point< T > &    a,
const gul::point< T > &    b,
const T &    eps
[inline]
 

Definition at line 233 of file gul_float.h.

00235 {
00236   T tol = eps / rtr<T>::root2_3();
00237 
00238   if( !abs_equal(a.x, b.x, tol) ) return false;
00239   if( !abs_equal(a.y, b.y, tol) ) return false;
00240   if( !abs_equal(a.z, b.z, tol) ) return false;
00241 
00242   return true;
00243 }

template<class T>
bool abs_equal const gul::hpoint1< T > &    a,
const gul::hpoint1< T > &    b,
const T &    eps
[inline]
 

Definition at line 221 of file gul_float.h.

00223 {
00224   T tol = eps / rtr<T>::root2_2();
00225 
00226   if( !abs_equal(a.x, b.x, tol) ) return false;
00227   if( !abs_equal(a.w, b.w, tol) ) return false;
00228 
00229   return true;
00230 }

template<class T>
bool abs_equal const gul::hpoint2< T > &    a,
const gul::hpoint2< T > &    b,
const T &    eps
[inline]
 

Definition at line 208 of file gul_float.h.

00210 {
00211   T tol = eps / rtr<T>::root2_3();
00212 
00213   if( !abs_equal(a.x, b.x, tol) ) return false;
00214   if( !abs_equal(a.y, b.y, tol) ) return false;
00215   if( !abs_equal(a.w, b.w, tol) ) return false;
00216 
00217   return true;
00218 }

template<class T>
bool abs_equal const gul::hpoint< T > &    a,
const gul::hpoint< T > &    b,
const T &    eps
[inline]
 

Definition at line 194 of file gul_float.h.

00196 {
00197   T tol = eps / (T)2;
00198 
00199   if( !abs_equal(a.x, b.x, tol) ) return false;
00200   if( !abs_equal(a.y, b.y, tol) ) return false;
00201   if( !abs_equal(a.z, b.z, tol) ) return false;
00202   if( !abs_equal(a.w, b.w, tol) ) return false;
00203 
00204   return true;
00205 }

template<class T>
bool abs_equal const T &    a,
const T &    b,
const T &    eps
[inline]
 

Definition at line 180 of file gul_float.h.

00181 {
00182   return rtr<T>::fabs(a-b) <= eps; 
00183 }

template<class X, class A>
void Assert   assertion [inline]
 

Definition at line 72 of file gul_error.h.

00073 {
00074  if(!assertion) throw X();
00075 }

template<class T>
int compare const T &    a,
const T &    b
[inline]
 

Definition at line 143 of file gul_types.h.

00144 {
00145   if( a < b ) 
00146     return -1;
00147   else if( a == b )
00148     return 0;
00149   return 1;
00150 } 

template<>
int compare const guar::rational   A,
const guar::rational   B
[inline]
 

Definition at line 626 of file guar_exact.h.

00627 {
00628   guar::Interval i;
00629   
00630   if( A.m == B.m )
00631     return 0;
00632 
00633   if( !A.m->m_bounds ) A.calc_bounds();
00634   if( !B.m->m_bounds ) B.calc_bounds();  
00635   i = A.m->m_i - B.m->m_i;
00636   if( i.m_high < 0.0 ) return(-1); 
00637   else if( i.m_low > 0.0 ) return(1); 
00638 
00639   guar::rational c = A - B;
00640   if( c.m->m_sign ) return(-1);
00641   if( c.m->m_na == 0 ) return(0);
00642 
00643   return(1);
00644 }

template<class T>
point<T> cross_product const point2< T > &    a,
const point2< T > &    b
[inline]
 

Definition at line 399 of file gul_vector.h.

00400 {
00401   return point<T>((T)0,
00402                   (T)0,
00403                   a.x*b.y-b.x*a.y);
00404 }

template<class T>
point<T> cross_product const point< T > &    a,
const point< T > &    b
[inline]
 

Definition at line 392 of file gul_vector.h.

00393 {
00394   return point<T>(a.y*b.z-b.y*a.z,
00395                   b.x*a.z-a.x*b.z,
00396                   a.x*b.y-b.x*a.y);
00397 }

template<class T>
void CubeVerts const Ptr< T > &    bb,
Ptr< point< T > > &    v
 

Definition at line 296 of file gul_matrix.h.

00297 {
00298   CubeVerts<T>( bb[0], bb[1], bb[2], bb[3], bb[4], bb[5], &v[0] );
00299 }

template<class T>
void CubeVerts const T &    xmin,
const T &    xmax,
const T &    ymin,
const T &    ymax,
const T &    zmin,
const T &    zmax,
point< T > *    v
 

Definition at line 257 of file gul_matrix.h.

00261 {
00262   v[0].x = xmin;
00263   v[0].y = ymin;
00264   v[0].z = zmin;
00265 
00266   v[1].x = xmax;
00267   v[1].y = ymin;
00268   v[1].z = zmin;
00269 
00270   v[2].x = xmax;
00271   v[2].y = ymax;
00272   v[2].z = zmin;
00273 
00274   v[3].x = xmin;
00275   v[3].y = ymax;
00276   v[3].z = zmin;
00277 
00278   v[4].x = xmin;
00279   v[4].y = ymin;
00280   v[4].z = zmax;
00281 
00282   v[5].x = xmax;
00283   v[5].y = ymin;
00284   v[5].z = zmax;
00285 
00286   v[6].x = xmax;
00287   v[6].y = ymax;
00288   v[6].z = zmax;
00289 
00290   v[7].x = xmin;
00291   v[7].y = ymax;
00292   v[7].z = zmax;
00293 }

template<class T>
void CubeVerts const T &    xmin,
const T &    xmax,
const T &    ymin,
const T &    ymax,
const T &    zmin,
const T &    zmax,
vec4< T > *    v
 

Definition at line 209 of file gul_matrix.h.

00213 {
00214   v[0][0] = xmin;
00215   v[0][1] = ymin;
00216   v[0][2] = zmin;
00217   v[0][3] = (T)1.0;
00218 
00219   v[1][0] = xmax;
00220   v[1][1] = ymin;
00221   v[1][2] = zmin;
00222   v[1][3] = (T)1.0;
00223 
00224   v[2][0] = xmax;
00225   v[2][1] = ymax;
00226   v[2][2] = zmin;
00227   v[2][3] = (T)1.0;
00228 
00229   v[3][0] = xmin;
00230   v[3][1] = ymax;
00231   v[3][2] = zmin;
00232   v[3][3] = (T)1.0;
00233 
00234 
00235   v[4][0] = xmin;
00236   v[4][1] = ymin;
00237   v[4][2] = zmax;
00238   v[4][3] = (T)1.0;
00239 
00240   v[5][0] = xmax;
00241   v[5][1] = ymin;
00242   v[5][2] = zmax;
00243   v[5][3] = (T)1.0;
00244 
00245   v[6][0] = xmax;
00246   v[6][1] = ymax;
00247   v[6][2] = zmax;
00248   v[6][3] = (T)1.0;
00249 
00250   v[7][0] = xmin;
00251   v[7][1] = ymax;
00252   v[7][2] = zmax;
00253   v[7][3] = (T)1.0;
00254 }

template<class T>
T distance const point1< T > &    a,
const point1< T > &    b
[inline]
 

Definition at line 459 of file gul_vector.h.

00460 {
00461   T x = a.x-b.x, d;
00462   
00463   d = rtr<T>::fabs( x );
00464   return d;
00465 }

template<class T>
T distance const point2< T > &    a,
const point2< T > &    b
[inline]
 

Definition at line 451 of file gul_vector.h.

00452 {
00453   T x = a.x-b.x, y = a.y-b.y, d;
00454   
00455   d = rtr<T>::sqrt( x*x + y*y );
00456   return d;
00457 }

template<class T>
T distance const point< T > &    a,
const point< T > &    b
[inline]
 

Definition at line 443 of file gul_vector.h.

00444 {
00445   T x = a.x-b.x, y = a.y-b.y, z = a.z-b.z, d;
00446   
00447   d = rtr<T>::sqrt( x*x + y*y + z*z );
00448   return d;
00449 }

template<class T>
point1<T> euclid const point1< T > &    a [inline]
 

Definition at line 344 of file gul_vector.h.

00345 {
00346   return a;
00347 }

template<class T>
point2<T> euclid const point2< T > &    a [inline]
 

Definition at line 292 of file gul_vector.h.

00293 {
00294   return a;
00295 }

template<class T>
point<T> euclid const point< T > &    a [inline]
 

Definition at line 225 of file gul_vector.h.

00226 {
00227   return a;
00228 }

template<class T>
point1<T> euclid const hpoint1< T > &    a [inline]
 

Definition at line 173 of file gul_vector.h.

00174 {
00175   return point1<T>(a.x/a.w);
00176 }

template<class T>
point2<T> euclid const hpoint2< T > &    a [inline]
 

Definition at line 121 of file gul_vector.h.

00122 {
00123   return point2<T>(a.x/a.w, a.y/a.w);
00124 }

template<class T>
point<T> euclid const hpoint< T > &    a [inline]
 

Definition at line 69 of file gul_vector.h.

00070 {
00071   return point<T>(a.x/a.w, a.y/a.w, a.z/a.w);
00072 }

template<class T>
T euclidian_distance const point1< T > &    a,
const point1< T > &    b
[inline]
 

Definition at line 510 of file gul_vector.h.

00511 {
00512   return distance(a,b);
00513 }

template<class T>
T euclidian_distance const point2< T > &    a,
const point2< T > &    b
[inline]
 

Definition at line 504 of file gul_vector.h.

00505 {
00506   return distance(a,b);
00507 }

template<class T>
T euclidian_distance const point< T > &    a,
const point< T > &    b
[inline]
 

Definition at line 498 of file gul_vector.h.

00499 {
00500   return distance(a,b);
00501 }

template<class T>
T euclidian_distance const hpoint1< T > &    a,
const hpoint1< T > &    b
[inline]
 

Definition at line 486 of file gul_vector.h.

00487 {
00488   point1<T> ea = euclid(a);
00489   point1<T> eb = euclid(b);
00490 
00491   return distance(ea,eb);
00492 }

template<class T>
T euclidian_distance const hpoint2< T > &    a,
const hpoint2< T > &    b
[inline]
 

Definition at line 477 of file gul_vector.h.

00478 {
00479   point2<T> ea = euclid(a);
00480   point2<T> eb = euclid(b);
00481 
00482   return distance(ea,eb);
00483 }

template<class T>
T euclidian_distance const hpoint< T > &    a,
const hpoint< T > &    b
[inline]
 

Definition at line 468 of file gul_vector.h.

00469 {
00470   point<T> ea = euclid(a);
00471   point<T> eb = euclid(b);
00472 
00473   return distance(ea,eb);
00474 }

template<class T>
T length const point< T > &    a [inline]
 

Definition at line 407 of file gul_vector.h.

00408 {
00409   return rtr<T>::sqrt(a.x*a.x + a.y*a.y + a.z*a.z);
00410 }

template<class T>
T Max const T &    a,
const T &    b,
const T &    c
[inline]
 

Definition at line 355 of file gul_types.h.

00356 { if((a > b) && (a > c)) return a; 
00357   else if(b > c) return b;
00358   return c; 
00359 } 

template<class T>
T Max const T &    a,
const T &    b
[inline]
 

Definition at line 350 of file gul_types.h.

00350 { return a > b ? a : b; } 

template<class T>
T max_norm const point2< T > &    a
 

Definition at line 120 of file gul_float.h.

00121 {
00122   T m;
00123 
00124   m = rtr<T>::fabs(a.x);
00125   if( rtr<T>::fabs(a.y) > m ) m = rtr<T>::fabs(a.y); 
00126   return m;
00127 }

template<class T>
T max_norm const point< T > &    a
 

Definition at line 109 of file gul_float.h.

00110 {
00111   T m;
00112 
00113   m = rtr<T>::fabs(a.x);
00114   if( rtr<T>::fabs(a.y) > m ) m = rtr<T>::fabs(a.y);
00115   if( rtr<T>::fabs(a.z) > m ) m = rtr<T>::fabs(a.z); 
00116   return m;
00117 }

template<class T, class T2>
void MCopy int    m,
int    n,
const Ptr< T2 > &    A,
Ptr< Ptr< T > > &    C
 

Definition at line 66 of file gul_matrix.h.

00067 {
00068   int i,j;
00069   
00070   for( i = 0; i < m; i++)
00071     for( j =0; j < n; j++)
00072       C[i][j] = (T)A[i*n+j];  
00073 }

template<class T, class T2>
void MCopy int    m,
int    n,
const Ptr< Ptr< T2 > > &    A,
Ptr< T > &    C
 

Definition at line 57 of file gul_matrix.h.

00058 {
00059   int i,j;
00060   
00061   for( i = 0; i < m; i++)
00062     for( j =0; j < n; j++)
00063       C[i*n+j] = (T)A[i][j];  
00064 }

template<class T, class T2>
void MCopy int    m,
int    n,
const Ptr< Ptr< T2 > > &    A,