mirror of https://github.com/CGAL/cgal
prefix macro with CGAL
This commit is contained in:
parent
b7e5ebab2a
commit
191eae691b
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 1997 ETH Zurich (Switzerland).
|
// Copyright (c) 1997 ETH Zurich (SwitzerlanBd).
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
// This file is part of CGAL (www.cgal.org); you may redistribute it under
|
// This file is part of CGAL (www.cgal.org); you may redistribute it under
|
||||||
|
|
@ -153,7 +153,7 @@ protected:
|
||||||
{
|
{
|
||||||
if ((is_less_equal(m_interface.get_left(element), v->left_key) &&
|
if ((is_less_equal(m_interface.get_left(element), v->left_key) &&
|
||||||
is_less_equal(v->right_key, m_interface.get_right(element)))
|
is_less_equal(v->right_key, m_interface.get_right(element)))
|
||||||
|| left(v)==TREE_BASE_NULL)
|
|| left(v)==CGAL_TREE_BASE_NULL)
|
||||||
v->objects.push_back( element);
|
v->objects.push_back( element);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -168,7 +168,7 @@ protected:
|
||||||
// elements is created.
|
// elements is created.
|
||||||
void build_next_dimension(link_type v)
|
void build_next_dimension(link_type v)
|
||||||
{
|
{
|
||||||
if(left(v)!=TREE_BASE_NULL)
|
if(left(v)!=CGAL_TREE_BASE_NULL)
|
||||||
{
|
{
|
||||||
build_next_dimension(left(v));
|
build_next_dimension(left(v));
|
||||||
build_next_dimension(right(v));
|
build_next_dimension(right(v));
|
||||||
|
|
@ -243,7 +243,7 @@ protected:
|
||||||
leftchild = vleft;
|
leftchild = vleft;
|
||||||
rightchild = vright;
|
rightchild = vright;
|
||||||
prevchild = vparent;
|
prevchild = vparent;
|
||||||
if(leftmostlink == TREE_BASE_NULL)
|
if(leftmostlink == CGAL_TREE_BASE_NULL)
|
||||||
leftmostlink = leftchild;
|
leftmostlink = leftchild;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -270,7 +270,7 @@ protected:
|
||||||
build_segment_tree(n - (int)n/2, leftchild, rightchild,
|
build_segment_tree(n - (int)n/2, leftchild, rightchild,
|
||||||
prevchild, leftmostlink, index, last, keys);
|
prevchild, leftmostlink, index, last, keys);
|
||||||
link_type vparent = new_Segment_tree_node_t
|
link_type vparent = new_Segment_tree_node_t
|
||||||
(prevchild, TREE_BASE_NULL, prevchild->left_key, prevchild->left_key);
|
(prevchild, CGAL_TREE_BASE_NULL, prevchild->left_key, prevchild->left_key);
|
||||||
prevchild->parent_link = vparent;
|
prevchild->parent_link = vparent;
|
||||||
build_segment_tree((int)n/2, leftchild, rightchild,
|
build_segment_tree((int)n/2, leftchild, rightchild,
|
||||||
prevchild, leftmostlink, index, last, keys);
|
prevchild, leftmostlink, index, last, keys);
|
||||||
|
|
@ -283,7 +283,7 @@ protected:
|
||||||
|
|
||||||
void delete_tree(link_type v)
|
void delete_tree(link_type v)
|
||||||
{
|
{
|
||||||
if(v->left_link!=TREE_BASE_NULL)
|
if(v->left_link!=CGAL_TREE_BASE_NULL)
|
||||||
{
|
{
|
||||||
delete_tree(left(v));
|
delete_tree(left(v));
|
||||||
delete_tree(right(v));
|
delete_tree(right(v));
|
||||||
|
|
@ -433,7 +433,7 @@ protected:
|
||||||
if(! T->is_valid())
|
if(! T->is_valid())
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(left(v)!=TREE_BASE_NULL)
|
if(left(v)!=CGAL_TREE_BASE_NULL)
|
||||||
{
|
{
|
||||||
if(!is_valid(left(v)))
|
if(!is_valid(left(v)))
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -469,19 +469,19 @@ public:
|
||||||
|
|
||||||
// construction of a tree
|
// construction of a tree
|
||||||
Segment_tree_d(Segment_tree_d const &sub_tree, bool):
|
Segment_tree_d(Segment_tree_d const &sub_tree, bool):
|
||||||
sublayer_tree(sub_tree.sublayer_tree->clone()), is_built(false), header(TREE_BASE_NULL)
|
sublayer_tree(sub_tree.sublayer_tree->clone()), is_built(false), header(CGAL_TREE_BASE_NULL)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// construction of a tree, definition of the prototype of sublayer tree
|
// construction of a tree, definition of the prototype of sublayer tree
|
||||||
Segment_tree_d(Tree_base<C_Data, C_Window> const &sub_tree):
|
Segment_tree_d(Tree_base<C_Data, C_Window> const &sub_tree):
|
||||||
sublayer_tree(sub_tree.clone()), is_built(false), header(TREE_BASE_NULL)
|
sublayer_tree(sub_tree.clone()), is_built(false), header(CGAL_TREE_BASE_NULL)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// destruction
|
// destruction
|
||||||
~Segment_tree_d()
|
~Segment_tree_d()
|
||||||
{
|
{
|
||||||
link_type v=root();
|
link_type v=root();
|
||||||
if(v!=TREE_BASE_NULL)
|
if(v!=CGAL_TREE_BASE_NULL)
|
||||||
delete_tree(v);
|
delete_tree(v);
|
||||||
if (header!=0)
|
if (header!=0)
|
||||||
delete_node(header);
|
delete_node(header);
|
||||||
|
|
@ -565,7 +565,7 @@ public:
|
||||||
link_type leftchild;
|
link_type leftchild;
|
||||||
link_type rightchild;
|
link_type rightchild;
|
||||||
link_type prevchild;
|
link_type prevchild;
|
||||||
link_type leftmostlink = TREE_BASE_NULL;
|
link_type leftmostlink = CGAL_TREE_BASE_NULL;
|
||||||
|
|
||||||
int start = 0;
|
int start = 0;
|
||||||
build_segment_tree(num-1, leftchild, rightchild, prevchild,
|
build_segment_tree(num-1, leftchild, rightchild, prevchild,
|
||||||
|
|
@ -636,7 +636,7 @@ public:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
link_type v = root();
|
link_type v = root();
|
||||||
if(v!=TREE_BASE_NULL)
|
if(v!=CGAL_TREE_BASE_NULL)
|
||||||
return window_query(win, result, v);
|
return window_query(win, result, v);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -689,7 +689,7 @@ public:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
link_type v = root();
|
link_type v = root();
|
||||||
if(v!=TREE_BASE_NULL)
|
if(v!=CGAL_TREE_BASE_NULL)
|
||||||
return enclosing_query(win, result, v);
|
return enclosing_query(win, result, v);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -697,7 +697,7 @@ public:
|
||||||
bool is_valid() const
|
bool is_valid() const
|
||||||
{
|
{
|
||||||
link_type v= root();
|
link_type v= root();
|
||||||
if(v!=TREE_BASE_NULL)
|
if(v!=CGAL_TREE_BASE_NULL)
|
||||||
return is_valid(v);
|
return is_valid(v);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@
|
||||||
#include <CGAL/assertions.h>
|
#include <CGAL/assertions.h>
|
||||||
#include <CGAL/Tree_assertions.h>
|
#include <CGAL/Tree_assertions.h>
|
||||||
|
|
||||||
#ifndef TREE_BASE_NULL
|
#ifndef CGAL_TREE_BASE_NULL
|
||||||
#define TREE_BASE_NULL 0
|
#define CGAL_TREE_BASE_NULL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define stlvector
|
#define stlvector
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue