6#include <gtest/gtest.h>
265 Point p1(10.0, 20.0);
266 Point p2(30.0, 40.0);
283 Point search_point(99.0, 99.0);
305 auto n1 =
g1.insert_node(
Point(0.0, 0.0));
306 auto n2 =
g1.insert_node(
Point(1.0, 1.0));
307 g1.insert_arc(n1, n2);
322 auto n1 =
g1.insert_node(
Point(0.0, 0.0));
323 auto n2 =
g1.insert_node(
Point(5.0, 5.0));
324 g1.insert_arc(n1, n2);
398 const size_t n = 1000;
400 for (
size_t i = 0; i < n; ++i)
402 double x =
static_cast<double>(i);
403 double y =
static_cast<double>(i * 2);
413 const size_t n = 100;
415 std::vector<ENode*>
nodes;
416 for (
size_t i = 0; i < n; ++i)
422 for (
size_t i = 0; i < n; ++i)
424 for (
size_t j = i + 1; j < n; ++j)
Geom_Number get_distance(Arc *arc)
Node * insert_node(Node *node) noexcept override
Insertion of a node already allocated.
Node * search_node(const Point &)
Arc * insert_arc(Node *src_node, Node *tgt_node, void *a)
ArcInfo & get_info() noexcept
Return a modifiable reference to the arc data.
NodeInfo & get_info() noexcept
Return a modifiable reference to the data contained in the node.
Node * get_src_node(Arc *arc) const noexcept
Return the source node of arc (only for directed graphs)
constexpr size_t get_num_nodes() const noexcept
Return the total of nodes of graph.
bool is_digraph() const noexcept
Return true if the graph this is directed.
constexpr size_t get_num_arcs() const noexcept
Node * get_tgt_node(Arc *arc) const noexcept
Return the target node of arc (only for directed graphs)
Rectangular point in the plane.
const Geom_Number & get_y() const
Returns y value.
const Geom_Number & get_x() const
Returns x value.
TEST_F(EuclidianGraphTest, NodeDefaultConstructor)
DynArray< Graph::Node * > nodes
Main namespace for Aleph-w library functions.
DynList< T > maps(const C &c, Op op)
Classic map operation.
2D point and geometric utilities.
Euclidean graph with 2D coordinates.