mirror of https://github.com/CGAL/cgal
formatting
This commit is contained in:
parent
769017938d
commit
096f1ffb9a
|
|
@ -169,8 +169,12 @@ print_dag(const Origin& nv, std::ostream& os, int level)
|
||||||
|
|
||||||
// Abstract base class for lazy numbers and lazy objects
|
// Abstract base class for lazy numbers and lazy objects
|
||||||
template <typename AT_, typename ET, typename E2A>
|
template <typename AT_, typename ET, typename E2A>
|
||||||
struct Lazy_rep : public Rep
|
class Lazy_rep : public Rep
|
||||||
{
|
{
|
||||||
|
Lazy_rep (const Lazy_rep&) { std::abort(); } // cannot be copied.
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
typedef AT_ AT;
|
typedef AT_ AT;
|
||||||
|
|
||||||
AT at;
|
AT at;
|
||||||
|
|
@ -187,10 +191,6 @@ struct Lazy_rep : public Rep
|
||||||
: at(a), et(new ET(e))
|
: at(a), et(new ET(e))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
private:
|
|
||||||
Lazy_rep (const Lazy_rep&) { std::abort(); } // cannot be copied.
|
|
||||||
public:
|
|
||||||
|
|
||||||
const AT& approx() const
|
const AT& approx() const
|
||||||
{
|
{
|
||||||
return at;
|
return at;
|
||||||
|
|
@ -309,12 +309,10 @@ public:
|
||||||
l1_ = L1();
|
l1_ = L1();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Lazy_rep_1(const AC& ac, const EC& ec, const L1& l1)
|
Lazy_rep_1(const AC& ac, const EC& ec, const L1& l1)
|
||||||
: Lazy_rep<AT,ET, E2A>(ac(CGAL::approx(l1))), EC(ec), l1_(l1)
|
: Lazy_rep<AT,ET, E2A>(ac(CGAL::approx(l1))), EC(ec), l1_(l1)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CGAL_LAZY_KERNEL_DEBUG
|
#ifdef CGAL_LAZY_KERNEL_DEBUG
|
||||||
void
|
void
|
||||||
print_dag(std::ostream& os, int level) const
|
print_dag(std::ostream& os, int level) const
|
||||||
|
|
@ -328,7 +326,6 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned depth() const { return CGAL::depth(l1_) + 1; }
|
unsigned depth() const { return CGAL::depth(l1_) + 1; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -416,9 +413,9 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Lazy_rep_3(const AC& ac, const EC& ec,
|
Lazy_rep_3(const AC& ac, const EC& ec,
|
||||||
const L1& l1, const L2& l2, const L3& l3)
|
const L1& l1, const L2& l2, const L3& l3)
|
||||||
: Lazy_rep<AT,ET,E2A>(ac(CGAL::approx(l1), CGAL::approx(l2),
|
: Lazy_rep<AT,ET,E2A>(ac(CGAL::approx(l1), CGAL::approx(l2),
|
||||||
CGAL::approx(l3))),
|
CGAL::approx(l3))),
|
||||||
l1_(l1), l2_(l2), l3_(l3)
|
l1_(l1), l2_(l2), l3_(l3)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
@ -477,9 +474,9 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Lazy_rep_4(const AC& ac, const EC& ec,
|
Lazy_rep_4(const AC& ac, const EC& ec,
|
||||||
const L1& l1, const L2& l2, const L3& l3, const L4& l4)
|
const L1& l1, const L2& l2, const L3& l3, const L4& l4)
|
||||||
: Lazy_rep<AT,ET,E2A>(ac(CGAL::approx(l1), CGAL::approx(l2),
|
: Lazy_rep<AT,ET,E2A>(ac(CGAL::approx(l1), CGAL::approx(l2),
|
||||||
CGAL::approx(l3), CGAL::approx(l4))),
|
CGAL::approx(l3), CGAL::approx(l4))),
|
||||||
l1_(l1), l2_(l2), l3_(l3), l4_(l4)
|
l1_(l1), l2_(l2), l3_(l3), l4_(l4)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
@ -544,11 +541,11 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Lazy_rep_5(const AC& ac, const EC& ec,
|
Lazy_rep_5(const AC& ac, const EC& ec,
|
||||||
const L1& l1, const L2& l2, const L3& l3, const L4& l4,
|
const L1& l1, const L2& l2, const L3& l3, const L4& l4,
|
||||||
const L5& l5)
|
const L5& l5)
|
||||||
: Lazy_rep<AT,ET,E2A>(ac(CGAL::approx(l1), CGAL::approx(l2),
|
: Lazy_rep<AT,ET,E2A>(ac(CGAL::approx(l1), CGAL::approx(l2),
|
||||||
CGAL::approx(l3), CGAL::approx(l4),
|
CGAL::approx(l3), CGAL::approx(l4),
|
||||||
CGAL::approx(l5))),
|
CGAL::approx(l5))),
|
||||||
l1_(l1), l2_(l2), l3_(l3), l4_(l4), l5_(l5)
|
l1_(l1), l2_(l2), l3_(l3), l4_(l4), l5_(l5)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
@ -615,11 +612,11 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Lazy_rep_6(const AC& ac, const EC& ec,
|
Lazy_rep_6(const AC& ac, const EC& ec,
|
||||||
const L1& l1, const L2& l2, const L3& l3, const L4& l4,
|
const L1& l1, const L2& l2, const L3& l3, const L4& l4,
|
||||||
const L5& l5, const L6& l6)
|
const L5& l5, const L6& l6)
|
||||||
: Lazy_rep<AT,ET,E2A>(ac(CGAL::approx(l1), CGAL::approx(l2),
|
: Lazy_rep<AT,ET,E2A>(ac(CGAL::approx(l1), CGAL::approx(l2),
|
||||||
CGAL::approx(l3), CGAL::approx(l4),
|
CGAL::approx(l3), CGAL::approx(l4),
|
||||||
CGAL::approx(l5), CGAL::approx(l6))),
|
CGAL::approx(l5), CGAL::approx(l6))),
|
||||||
l1_(l1), l2_(l2), l3_(l3), l4_(l4), l5_(l5), l6_(l6)
|
l1_(l1), l2_(l2), l3_(l3), l4_(l4), l5_(l5), l6_(l6)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
@ -691,12 +688,12 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Lazy_rep_7(const AC& ac, const EC& ec,
|
Lazy_rep_7(const AC& ac, const EC& ec,
|
||||||
const L1& l1, const L2& l2, const L3& l3, const L4& l4,
|
const L1& l1, const L2& l2, const L3& l3, const L4& l4,
|
||||||
const L5& l5, const L6& l6, const L7& l7)
|
const L5& l5, const L6& l6, const L7& l7)
|
||||||
: Lazy_rep<AT,ET,E2A>(ac(CGAL::approx(l1), CGAL::approx(l2),
|
: Lazy_rep<AT,ET,E2A>(ac(CGAL::approx(l1), CGAL::approx(l2),
|
||||||
CGAL::approx(l3), CGAL::approx(l4),
|
CGAL::approx(l3), CGAL::approx(l4),
|
||||||
CGAL::approx(l5), CGAL::approx(l6),
|
CGAL::approx(l5), CGAL::approx(l6),
|
||||||
CGAL::approx(l7))),
|
CGAL::approx(l7))),
|
||||||
l1_(l1), l2_(l2), l3_(l3), l4_(l4), l5_(l5), l6_(l6), l7_(l7)
|
l1_(l1), l2_(l2), l3_(l3), l4_(l4), l5_(l5), l6_(l6), l7_(l7)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
@ -772,12 +769,12 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Lazy_rep_8(const AC& ac, const EC& ec,
|
Lazy_rep_8(const AC& ac, const EC& ec,
|
||||||
const L1& l1, const L2& l2, const L3& l3, const L4& l4,
|
const L1& l1, const L2& l2, const L3& l3, const L4& l4,
|
||||||
const L5& l5, const L6& l6, const L7& l7, const L8& l8)
|
const L5& l5, const L6& l6, const L7& l7, const L8& l8)
|
||||||
: Lazy_rep<AT,ET,E2A>(ac(CGAL::approx(l1), CGAL::approx(l2),
|
: Lazy_rep<AT,ET,E2A>(ac(CGAL::approx(l1), CGAL::approx(l2),
|
||||||
CGAL::approx(l3), CGAL::approx(l4),
|
CGAL::approx(l3), CGAL::approx(l4),
|
||||||
CGAL::approx(l5), CGAL::approx(l6),
|
CGAL::approx(l5), CGAL::approx(l6),
|
||||||
CGAL::approx(l7), CGAL::approx(l8))),
|
CGAL::approx(l7), CGAL::approx(l8))),
|
||||||
l1_(l1), l2_(l2), l3_(l3), l4_(l4), l5_(l5), l6_(l6), l7_(l7), l8_(l8)
|
l1_(l1), l2_(l2), l3_(l3), l4_(l4), l5_(l5), l6_(l6), l7_(l7), l8_(l8)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
@ -1060,8 +1057,8 @@ class Lazy : public Handle
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
|
|
||||||
typedef Lazy<AT_, ET_, EFT, E2A> Self;
|
typedef Lazy<AT_, ET_, EFT, E2A> Self;
|
||||||
typedef Lazy_rep<AT_, ET_, E2A> Self_rep;
|
typedef Lazy_rep<AT_, ET_, E2A> Self_rep;
|
||||||
|
|
||||||
typedef AT_ AT; // undocumented
|
typedef AT_ AT; // undocumented
|
||||||
typedef ET_ ET; // undocumented
|
typedef ET_ ET; // undocumented
|
||||||
|
|
@ -1069,6 +1066,7 @@ public :
|
||||||
typedef AT Approximate_type;
|
typedef AT Approximate_type;
|
||||||
typedef ET Exact_type;
|
typedef ET Exact_type;
|
||||||
|
|
||||||
|
/*
|
||||||
typedef Self Rep;
|
typedef Self Rep;
|
||||||
|
|
||||||
const Rep& rep() const
|
const Rep& rep() const
|
||||||
|
|
@ -1080,17 +1078,7 @@ public :
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
private:
|
|
||||||
|
|
||||||
struct dummy_zero_tag{};
|
|
||||||
|
|
||||||
Lazy(dummy_zero_tag)
|
|
||||||
{
|
|
||||||
PTR = new Lazy_rep_0<AT,ET, E2A>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
Lazy()
|
Lazy()
|
||||||
: Handle(zero()) {}
|
: Handle(zero()) {}
|
||||||
|
|
@ -1138,12 +1126,11 @@ private:
|
||||||
// which is in particular heavily used for pruning DAGs.
|
// which is in particular heavily used for pruning DAGs.
|
||||||
static const Self & zero()
|
static const Self & zero()
|
||||||
{
|
{
|
||||||
static const Self z = Lazy(dummy_zero_tag());
|
static const Self z = new Lazy_rep_0<AT, ET, E2A>();
|
||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
|
|
||||||
Self_rep * ptr() const { return (Self_rep*) PTR; }
|
Self_rep * ptr() const { return (Self_rep*) PTR; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,10 +108,6 @@ struct Lazy_exact_nt_rep : public Lazy_exact_nt<ET>::Self_rep
|
||||||
this->print_at_et(os, level);
|
this->print_at_et(os, level);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
|
||||||
Lazy_exact_nt_rep (const Lazy_exact_nt_rep&) { std::abort(); } // cannot be copied.
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// int constant
|
// int constant
|
||||||
|
|
@ -124,7 +120,6 @@ struct Lazy_exact_Int_Cst : public Lazy_exact_nt_rep<ET>
|
||||||
void update_exact() { this->et = new ET((int)this->approx().inf()); }
|
void update_exact() { this->et = new ET((int)this->approx().inf()); }
|
||||||
|
|
||||||
unsigned depth() const { return 0; }
|
unsigned depth() const { return 0; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// double constant
|
// double constant
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue