257using namespace Aleph;
261 template <
typename M>
266 return m(i)->get_info().nombre;
271 template <
typename M>
276 return m(m(i, j))->get_info().nombre;
281 template <
typename M>
286 typename M::Arc_Type::Distance_Type value = mat(i, j);
288 if (value == numeric_limits<double>::infinity())
289 return string(
"{$\\infty$}");
292 return string(
"{$0$}");
343const double Arco::Max_Distance = numeric_limits<double>::infinity();
345const double Arco::Zero_Distance = 0;
358 const double & distancia)
370 grafo.insert_arc(n1, n2,
Arco(distancia));
412 value = arc->
get_info().get_distance();
426 ofstream
out(
"mat-floyd.tex", ios::trunc);
Auxiliary adjacency matrix with custom entry type.
Generic directed graph (digraph) wrapper template.
typename BaseGraph::Node Node
ArcInfo & get_info() noexcept
Return a modifiable reference to the arc data.
Floyd-Warshall algorithm with LaTeX output generation.
Matrix to LaTeX table conversion utilities.
Main namespace for Aleph-w library functions.
DynList< T > maps(const C &c, Op op)
Classic map operation.
Arc of graph implemented with double-linked adjacency lists.
Node belonging to a graph implemented with a double linked adjacency list.
static const double Zero_Distance
static const double Max_Distance
const double & get_distance() const
string operator()(M &m, const long &i) const
string operator()(M &m, const long &i, const long &j)
string operator()(M &mat, const long &i, const long &j)
bool operator==(const Nodo &der) const
Utility algorithms and operations for graphs.
Adjacency matrix representations for graphs.
void copia_Arco_Arco(Arco_Arco *arc, const long &, const long &, double &value)
void insertar_arco(Grafo &grafo, const string &src_name, const string &tgt_name, const double &distancia)
List_Digraph< Node_Nodo, Arco_Arco > Grafo
void build_test_graph(Grafo &g)
Graph_Arc< Arco > Arco_Arco
Graph_Node< Nodo > Node_Nodo