168 <<
"Eepic_Geom_Object is null";
308 const double &
max)
const
314 result =
max * result;
325 double xpic(
const double & x)
const
397 void zoom(
const double & factor)
452 <<
"Degenerate bounding box";
471 return "(" + std::to_string(x) +
"," + std::to_string(
y) +
")";
489 output << std::fixed << std::setprecision(6);
494 <<
"\\filltype{" <<
fill_type <<
"}" << std::endl
504 <<
"% " <<
list.
size() <<
" geometric objects were put in the plane"
519 output <<
"\\thinlines" << std::endl
526 output <<
"\\end{picture}" << std::endl
544 const double &
get_r()
const {
return r; }
660 <<
" %% mapped in this plane to (" << x <<
"," <<
y <<
")"
662 <<
"\\put(" << x <<
"," <<
y <<
"){\\ellipse{" <<
r
663 <<
"}{" <<
r <<
"}}" << std::endl
668# define COMPUTE_SEGMENT_EEPIC_COORDENATES() \
669 const double src_x = x_geom_number_to_eepic(sg.get_src_point().get_x()); \
671 const double src_y = y_geom_number_to_eepic(sg.get_src_point().get_y()); \
673 const double tgt_x = x_geom_number_to_eepic(sg.get_tgt_point().get_x()); \
675 const double tgt_y = y_geom_number_to_eepic(sg.get_tgt_point().get_y());
678# define DRAW_SEGMENT(sg, output) \
679 COMPUTE_SEGMENT_EEPIC_COORDENATES(); \
680 output << " %% Segment from " << sg.get_src_point().to_string() \
681 << " to " << sg.get_tgt_point().to_string() << std::endl \
682 << " %% mapped in this plane to (" << src_x << "," << src_y \
683 << ") to (" << tgt_x << "," << tgt_y << ")" << std::endl \
684 << "\\path(" << src_x << "," << src_y \
685 << ")(" << tgt_x << "," << tgt_y << ")" << std::endl \
700# define PUT_ARROW() \
701 const double arrow_width = arrow_width_in_mm/resolution; \
702 const double arrow_lenght = arrow_lenght_in_mm/resolution; \
704 const double l = sqrt(arrow_width*arrow_width + arrow_lenght*arrow_lenght); \
705 const double tetha = atan2(arrow_width, arrow_lenght); \
706 const double phi = atan2( fabs(tgt_y - src_y), fabs(tgt_x - src_x) ); \
708 double dx1 = l*cos(phi - tetha); \
709 double dy1 = l*sin(phi - tetha); \
711 double dx2 = l*sin(M_PI_2 - (phi + tetha)); \
712 double dy2 = l*cos(M_PI_2 - (phi + tetha)); \
726 output << std::endl \
727 << " % Drawing of arrow's edges at (" << tgt_x \
728 << "," << tgt_y << ")" << std::endl \
729 << "\\path(" << tgt_x << "," << tgt_y << ")(" \
730 << tgt_x + dx1 << "," << tgt_y + dy1 << ")" << std::endl \
731 << "\\path(" << tgt_x << "," << tgt_y << ")(" \
732 << tgt_x + dx2 << "," << tgt_y + dy2 << ")" << std::endl << std::endl;
735# define DRAW_ARROW(sg, output) \
736 DRAW_SEGMENT(sg, output); \
746# define DRAW_DOTTED_SEGMENT(sg, output) \
747 COMPUTE_SEGMENT_EEPIC_COORDENATES(); \
749 output << " %% Dotted Segment from " << sg.get_src_point().to_string() \
750 << " to " << sg.get_tgt_point().to_string() << std::endl \
751 << " %% mapped in this plane to (" << src_x << "," << src_y \
752 << ") to (" << tgt_x << "," << tgt_y << ")" << std::endl \
753 << "\\dottedline{" << dotgap << "}(" << src_x \
754 << "," << src_y << ")(" << tgt_x << "," << tgt_y << ")" << std::endl \
764# define DRAW_DASH_SEGMENT(sg, output) \
765 COMPUTE_SEGMENT_EEPIC_COORDENATES(); \
767 output << " %% Dash Segment from " << sg.get_src_point().to_string() \
768 << " to " << sg.get_tgt_point().to_string() << std::endl \
769 << " %% mapped in this plane to (" << src_x << "," << src_y \
770 << ") to (" << tgt_x << "," << tgt_y << ")" << std::endl \
771 << "\\dashline{" << dotgap << "}(" << src_x \
772 << "," << src_y << ")(" << tgt_x << "," << tgt_y << ")" << std::endl \
782# define DRAW_ARROW_DOTTED_SEGMENT(sg, output) \
783 COMPUTE_SEGMENT_EEPIC_COORDENATES(); \
785 output << " %% Dotted arrow Segment from " << sg.get_src_point().to_string() \
786 << " to " << sg.get_tgt_point().to_string() << std::endl \
787 << " %% mapped in this plane to (" << src_x << "," << src_y \
788 << ") to (" << tgt_x << "," << tgt_y << ")" << std::endl \
789 << "\\dottedline{" << dotgap << "}(" << src_x \
790 << "," << src_y << ")(" << tgt_x << "," << tgt_y << ")" << std::endl \
801# define DRAW_ARROW_DASH_SEGMENT(sg, output) \
802 COMPUTE_SEGMENT_EEPIC_COORDENATES(); \
804 output << " %% Dash arrow Segment from " << sg.get_src_point().to_string() \
805 << " to " << sg.get_tgt_point().to_string() << std::endl \
806 << " %% mapped in this plane to (" << src_x << "," << src_y \
807 << ") to (" << tgt_x << "," << tgt_y << ")" << std::endl \
808 << "\\dashline{" << dotgap << "}(" << src_x \
809 << "," << src_y << ")(" << tgt_x << "," << tgt_y << ")" << std::endl \
833 <<
" with horizontal radius of " << e.
get_hradius()
834 <<
" and vertical radius of " << e.
get_vradius() << std::endl
835 <<
" %% mapped in the plane at center (" << x
836 <<
"," <<
y <<
") with horizontal radius of " <<
hd
837 <<
" and vertical radius of " <<
vd << std::endl
838 <<
"\\put(" << x <<
"," <<
y <<
"){\\ellipse{" <<
hd
839 <<
"}{" <<
vd <<
"}}" << std::endl
852 template <
class Poly>
857 for (
typename Poly::Segment_Iterator it(poly); it.has_curr(); it.next_ne())
863 template <
class Poly>
866 output <<
" % Drawing of polygon of " << poly.size()
867 <<
" sides" << std::endl
870 for (
typename Poly::Vertex_Iterator it(poly); it.has_curr(); it.next_ne())
873 if (poly.is_closed())
878 template <
class Poly>
881 output <<
" % Drawing of dotted line Polygon" << std::endl
882 <<
"\\shade\\dottedline{" <<
dotgap <<
"}";
884 for (
typename Poly::Vertex_Iterator it(poly); it.has_curr(); it.next_ne())
887 if (poly.is_closed())
892 template <
class Poly>
895 for (
typename Poly::Vertex_Iterator it(poly); it.has_curr(); it.next_ne())
897 Vertex & vertex = it.get_current_vertex();
911 template <
class Poly>
914 for (
typename Poly::Segment_Iterator it(poly); it.has_curr(); it.next_ne())
916 const Segment & sg = it.get_current_segment();
922 template <
class Poly>
938 output <<
" %% Text Point " << str
939 <<
" %% mapped in this plane to (" << x <<
"," <<
y <<
")"
941 <<
"\\put(" << x <<
"," <<
y <<
"){\\texttt{" << str
948 template <
class Poly>
951 for (
typename Poly::Vertex_Iterator it(poly); it.has_curr(); it.next_ne())
957 template <
class Poly>
962 for (
typename Poly::Vertex_Iterator it(poly);
963 it.has_curr(); it.next_ne(), ++n)
965 Vertex & vertex = it.get_current_vertex();
971 output <<
" %% Poligon Vertex Number " << n
972 <<
" %% mapped in this plane to (" << x <<
"," <<
y <<
")"
974 <<
"\\put(" << x <<
"," <<
y <<
"){$" << n <<
"$}" << std::endl
980 template <
class Poly>
983 output <<
" % Drawing spline of " << poly.size()
984 <<
" points" << std::endl
987 for (
typename Poly::Vertex_Iterator it(poly); it.has_curr(); it.next_ne())
990 if (poly.is_closed())
995 template <
class Poly>
998 output <<
" % Drawing dash curve of " << poly.size()
999 <<
" points" << std::endl
1002 for (
typename Poly::Vertex_Iterator it(poly); it.has_curr(); it.next_ne())
1005 if (poly.is_closed())
1010 template <
class Poly>
1021 template <
class Poly>
1045 <<
"% mapped to the plane at (" << x <<
"," <<
y <<
")" << std::endl
1046 <<
"\\put(" << x <<
"," <<
y <<
"){\\texttt{"
1048 <<
"}}" << std::endl
1063# define DEFINE_EEPIC_COPY_CTOR(Type) \
1064 Eepic_##Type(const Type & o) : Eepic_Geom_Object(new Type(o), true) { }
1068# define DEFINE_EEPIC_COMMON_METHODS(Type) \
1069 friend void put_in_plane(Eepic_Plane & plane, const Type & geom_obj); \
1071 ~Eepic_##Type() { } \
1073 Point highest_point() const override \
1075 return static_cast<const Type*>(geom_object_ptr)->highest_point(); \
1078 Point lowest_point() const override \
1080 return static_cast<const Type*>(geom_object_ptr)->lowest_point(); \
1083 Point leftmost_point() const override \
1085 return static_cast<const Type*>(geom_object_ptr)->leftmost_point(); \
1088 Point rightmost_point() const override \
1090 return static_cast<const Type*>(geom_object_ptr)->rightmost_point(); \
1093 Eepic_Geom_Object * clone() const override \
1095 return new Eepic_##Type(static_cast<const Type&>(*geom_object_ptr)); \
1098 void draw(Eepic_Plane * plane, std::ostream & output) const override;
1102# define DEFINE_EEPIC_COMMON_WITH_COPY_CTOR(Type) \
1103 DEFINE_EEPIC_COPY_CTOR(Type) \
1104 DEFINE_EEPIC_COMMON_METHODS(Type)
1108# define DEFINE_EEPIC_COMMON_WITHOUT_COPY_CTOR(Type) \
1109 DEFINE_EEPIC_COMMON_METHODS(Type) \
1110 Eepic_##Type(const Type &);
1114# define DEFINE_PUT_IN_PLANE(Type) \
1115 extern void put_in_plane(Eepic_Plane & plane, const Type & geom_obj)
1118# define IMPL_PUT_IN_PLANE(Type) \
1119 void put_in_plane(Eepic_Plane & plane, const Type & geom_obj) \
1121 Eepic_##Type eepic_obj(geom_obj); \
1123 plane.put(eepic_obj); \
1134# define DEFINE_EEPIC_CLASS(Type) \
1135 class Eepic_##Type : public Eepic_Geom_Object \
1137 DEFINE_EEPIC_COMMON_WITH_COPY_CTOR(Type) \
1140 DEFINE_PUT_IN_PLANE(Type)
1146# define DEFINE_EEPIC_CLASS_AND_MEMBERS(Type, ...) \
1147 class Eepic_##Type : public Eepic_Geom_Object \
1150 DEFINE_EEPIC_COMMON_WITHOUT_COPY_CTOR(Type) \
1153 DEFINE_PUT_IN_PLANE(Type)
1170# define DEFINE_CLASS_DERIVATED_FROM_SEGMENT(Name) \
1171 struct Name : public Segment \
1175 Name(const Segment & s) : Segment(s) \
1179 Name(const Point & __src, const Point & __tgt) \
1180 : Segment(__src, __tgt) \
1185 Name(const Point & __src, \
1186 const Geom_Number & m, \
1187 const Geom_Number & d) \
1188 : Segment(__src, m, d) \
1196# define DEFINE_EEPIC_SEGMENT_CLASS(Name) \
1197 DEFINE_CLASS_DERIVATED_FROM_SEGMENT(Name) \
1198 DEFINE_EEPIC_CLASS(Name);
1203# define DEFINE_EEPIC_SEGMENT_CLASS_AND_MEMBERS(Name, ...) \
1204 DEFINE_CLASS_DERIVATED_FROM_SEGMENT(Name) \
1205 DEFINE_EEPIC_CLASS_AND_MEMBERS(Name, __VA_ARGS__);
1242# define DEFINE_CLASS_DERIVATED_FROM_ELLIPSE(Name) \
1243 struct Name : public Ellipse \
1247 Name(const Ellipse & p) : Ellipse(p) \
1252 Name(const Point & center, \
1253 const Geom_Number & hr, \
1254 const Geom_Number & vr) \
1255 : Ellipse(center, hr, vr) \
1273# define DEFINE_CLASS_DERIVATED_FROM_TEXT(Name) \
1274 struct Name : public Text \
1278 Name(const Text & t) : Text(t) \
1283 Name(const Point & p, const std::string & str) \
1317# define DEFINE_CLASS_DERIVATED_FROM_POLYGON(Name) \
1318 struct Name : public Polygon \
1322 Name(const Polygon & p) : Polygon(p) \
1329# define DEFINE_EEPIC_POLYGON(Name) \
1330 DEFINE_CLASS_DERIVATED_FROM_POLYGON(Name); \
1331 DEFINE_EEPIC_CLASS(Name);
1446# define DEFINE_CLASS_DERIVATED_FROM_REGULAR_POLYGON(Name) \
1447 struct Name : public Regular_Polygon \
1451 Name(const Regular_Polygon & p) : Regular_Polygon(p) \
1456 Name(const Point & c, \
1457 const double & side_sz, \
1459 const double & ang = 0) \
1460 : Regular_Polygon(c, side_sz, n, ang) \
1467# define DEFINE_EEPIC_REGULAR_POLYGON(Name) \
1468 DEFINE_CLASS_DERIVATED_FROM_REGULAR_POLYGON(Name); \
1469 DEFINE_EEPIC_CLASS(Name);
Exception handling system with formatted messages for Aleph-w.
#define ah_domain_error_if(C)
Throws std::domain_error if condition holds.
#define ah_logic_error()
Throws std::logic_error unconditionally.
bool has_curr() const noexcept
Return true if the iterator has current item.
constexpr bool is_empty() const noexcept
Return true if this (as header node) is empty.
void next_ne() noexcept
Move the iterator one position forward guaranteeing no exception.
T & get_curr() const
Return the current item; throw overflow_error if there is no current item.
void next()
Move the iterator one item forward.
Dynamic doubly linked list with O(1) size and bidirectional access.
const size_t & size() const noexcept
Return the number of elements (constant time)
T & append(const T &item)
Append a copied item at the end of the list.
T remove_first_ne() noexcept
Remove the first item of the list; return a copy of removed item.
const Geom_Number & get_vradius() const
Gets the vertical radius.
const Point & get_center() const
Gets the center point of the ellipse.
const Geom_Number & get_hradius() const
Gets the horizontal radius.
Represents a point with rectangular coordinates in a 2D plane.
const Geom_Number & get_x() const noexcept
Gets the x-coordinate value.
std::string to_string() const
Returns a string representation of the point as "(x,y)".
const Geom_Number & get_y() const noexcept
Gets the y-coordinate value.
A general (irregular) 2D polygon defined by a sequence of vertices.
A regular polygon defined by center, side length, and vertex count.
Represents a line segment between two points.
Represents a text string positioned at a 2D point.
static constexpr double font_height_in_points
static constexpr double font_width_in_points
const std::string & get_str() const
Gets the text string.
const Point & get_point() const
Gets the position point of the text.
const size_t & len() const
Gets the estimated length of the text.
A non-degenerate triangle defined by three points.
A vertex in a polygon's doubly linked vertex list.
Abstract base class for EEPIC-drawable geometric objects.
virtual Eepic_Geom_Object * clone() const =0
Create a polymorphic copy of this object.
const Geom_Object *const geom_object_ptr
Pointer to the wrapped geometric object.
virtual ~Eepic_Geom_Object()
Virtual destructor.
Eepic_Geom_Object(Geom_Object *ptr, const bool &__to_delete=false)
Construct an EEPIC wrapper for a geometric object.
Eepic_Geom_Object(const Eepic_Geom_Object &)
virtual void draw(Eepic_Plane *plane, std::ostream &output) const
Generate EEPIC code for this object.
virtual Point lowest_point() const =0
Get the lowest point (minimum y-coordinate) of this object.
virtual Point highest_point() const =0
Get the highest point (maximum y-coordinate) of this object.
bool to_delete
Flag indicating ownership of geom_object_ptr.
virtual Point rightmost_point() const =0
Get the rightmost point (maximum x-coordinate) of this object.
virtual Point leftmost_point() const =0
Get the leftmost point (minimum x-coordinate) of this object.
2D canvas for generating EEPIC/LaTeX picture environments.
static const double dotgap
Gap between dots in dotted lines.
void draw_dotted_segment(const Segment &sg, std::ostream &output)
Emit EEPIC code to draw dotted segment sg.
const double & get_height() const
Picture height (in EEPIC units).
Geom_Number geom_height
Height from lowest to highest point.
std::string fill_type
Fill type for shapes (e.g., "black")
void draw_arrow_dash_segment(const Segment &sg, std::ostream &output)
Emit EEPIC code to draw dashed segment sg with arrow head.
Point __lowest
Point with minimum y-coordinate.
Point __leftmost
Point with minimum x-coordinate.
Eepic_Plane(const double &__wide, const double &__height, const double &__xoffset=0.0, const double &__yoffset=0.0)
Construct a plane with a fixed picture frame.
void zoom(const double &factor)
Scale the EEPIC plane in real points (zoom in/out).
void set_fill_type(const std::string &ftype)
Set the fill type used by LaTeX eepic (e.g., "black").
void draw_point_text(const Point &p, std::ostream &output)
double real_wide
Actual width after scaling.
void draw_segment(const Segment &sg, std::ostream &output)
Emit EEPIC code to draw segment sg.
double get_shade_thickness() const
Return the current shading thickness.
Geom_Number geom_y_min
Minimum y value in geometric coordinates.
double y_geom_number_to_eepic(const Geom_Number &y) const
Convert a geometric y coordinate into plane y coordinate.
void compute_geom_plane(const bool &squarize)
Compute extreme coordinates and derive width/height of all objects.
DynDlist< Eepic_Geom_Object * > list
List of geometric objects.
double x_min
Minimum x value in plane coordinates.
const double & get_yoffset() const
Y offset of the LaTeX picture environment.
double r
Actual radius in real points for drawing a point.
void draw_dash_spline(Poly &poly, std::ostream &output)
void set_resolution(const double &res)
Set the output resolution in millimeters (unitlength = res mm).
double y_min
Minimum y value in plane coordinates.
double resolution
Resolution in millimeters (default: 0.05mm)
double height
Height in resolution points.
Point __rightmost
Point with maximum x-coordinate.
bool with_cartesian_axis
Flag to draw Cartesian axes.
static const double arrow_lenght_in_mm
Point __highest
Point with maximum y-coordinate.
static const double normal_thickness
Default line thickness.
const double & get_wide() const
Plane accessors.
Geom_Number geom_wide
Width from leftmost to rightmost point.
double wide
Width in resolution points.
const double & get_xoffset() const
X offset of the LaTeX picture environment.
double ypic(const double &y) const
Normalize to y-axis origin.
static const double default_r
Default radius for drawing points (also used for text height)
void compute_extreme_points()
Linear scan over all objects to compute extreme points.
double get_dotgap() const
Return the dot gap used for dotted/dashed lines.
void draw_ellipse(const Ellipse &e, std::ostream &output)
Emit EEPIC code to draw ellipse e.
void draw_arrow_extreme(const Segment &sg, std::ostream &output)
static const double default_shade_thickness
Default shading thickness.
double xoffset
Additional horizontal margin.
double h_geom_number_to_eepic(const Geom_Number &x) const
Convert a geometric x proportion into plane units using wide.
const double & get_resolution() const
Return the current output resolution in millimeters.
void draw_text(const Text &t, std::ostream &output, const double &hfactor, const double &vfactor)
void draw_dots_from_polygon(Poly &poly, std::ostream &output)
void set_shade_thickness(const double &__thickness)
Set the thickness used for shaded primitives.
void(Eepic_Plane::* Draw_Segment_Fct)(const Segment &poly, std::ostream &output)
void draw_points_text_in_polygon(Poly &poly, std::ostream &output)
void draw_dash_spline_arrow(Poly &poly, std::ostream &output)
double real_height
Actual height after scaling.
void draw_closed_polygon(Poly &poly, std::ostream &output)
void draw_polygon(Poly &poly, std::ostream &output, Draw_Segment_Fct draw_sg_fct)
void draw_closed_polygon_with_arrows(Poly &poly, std::ostream &output)
double x_geom_number_to_eepic(const Geom_Number &x) const
Convert a geometric x coordinate into plane x coordinate.
const Point & highest() const
std::string shade_type
Shading type for segments.
void put_cartesian_axis()
Enable drawing Cartesian axes when calling draw().
void draw_arrow(const Segment &sg, std::ostream &output)
Emit EEPIC code to draw segment sg with an arrow head.
void draw_vertex_numbers_in_polygon(Poly &poly, std::ostream &output)
double shade_thickness
Current shading thickness.
double yoffset
Additional vertical margin.
const double & get_r() const
Radius used to draw points (also used as text baseline offset).
void draw_arrows_in_polygon(Poly &poly, std::ostream &output)
double v_geom_number_to_eepic(const Geom_Number &y) const
Convert a geometric y proportion into plane units using height.
Geom_Number geom_x_min
Minimum x value in geometric coordinates.
static const double arrow_width_in_mm
void put(const Eepic_Geom_Object &__eepic_geom_obj)
Design note: why Eepic_Plane stores Eepic_Geom_Object wrappers.
const Point & lowest() const
const Point & rightmost() const
void draw_spline(Poly &poly, std::ostream &output)
void draw_point(const Point &p, std::ostream &output)
EEPIC "primitive drawing" methods.
double geom_number_to_plane(const Geom_Number &p, const Geom_Number &geom_max, const double &max) const
Rescales a coordinate value p from a geometric scale geom_max into the plane scale max.
void draw_dotted_closed_polygon(Poly &poly, std::ostream &output)
void draw(std::ostream &output, const bool &squarize=true)
Emits a complete LaTeX picture environment containing the geometric objects.
~Eepic_Plane()
Destructor: deletes all stored Eepic_Geom_Object clones.
void draw_arrow_dotted_segment(const Segment &sg, std::ostream &output)
Emit EEPIC code to draw dotted segment sg with arrow head.
void draw_dash_segment(const Segment &sg, std::ostream &output)
Emit EEPIC code to draw dashed segment sg.
void draw_spline_arrow(Poly &poly, std::ostream &output)
void draw_cartesian_axis(std::ostream &output)
Draws the Cartesian axes on the plane, if enabled.
const Point & leftmost() const
double xpic(const double &x) const
Points must be normalized to the plane size (in picture coordinates).
std::string point_string(const Point &p)
Given point p, returns "(x,y)" in normalized plane coordinates.
#define DRAW_DOTTED_SEGMENT(sg, output)
#define DEFINE_EEPIC_CLASS(Type)
Fundamental macro to declare a class derived from Eepic_Geom_Object.
#define DEFINE_EEPIC_REGULAR_POLYGON(Name)
#define DRAW_ARROW(sg, output)
bool tiny_keys
Global flag to enable tiny font size for keys/labels.
#define DRAW_ARROW_DOTTED_SEGMENT(sg, output)
#define DEFINE_EEPIC_SEGMENT_CLASS(Name)
#define DEFINE_CLASS_DERIVATED_FROM_ELLIPSE(Name)
#define DRAW_DASH_SEGMENT(sg, output)
#define COMPUTE_SEGMENT_EEPIC_COORDENATES()
#define DRAW_ARROW_DASH_SEGMENT(sg, output)
#define DEFINE_EEPIC_POLYGON(Name)
#define DEFINE_CLASS_DERIVATED_FROM_TEXT(Name)
Text wrappers.
#define DRAW_SEGMENT(sg, output)
__gmp_expr< typename __gmp_resolve_expr< T, V >::value_type, __gmp_binary_expr< __gmp_expr< T, U >, __gmp_expr< V, W >, __gmp_max_function > > max(const __gmp_expr< T, U > &expr1, const __gmp_expr< V, W > &expr2)
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.
double geom_number_to_double(const Geom_Number &n)
Converts a Geom_Number to its double precision representation.
mpq_class Geom_Number
Numeric type used by the geometry module.
2D point and geometric utilities.
2D polygon representation and geometric operations.
Base class for all geometric objects.
Segment-drawing variants (types).
Dynamic doubly linked list implementation.
Comprehensive sorting algorithms and search utilities for Aleph-w.