vorrei sapere qs istruzione in C++ cosa fa, sono all'interno di un simulatore di rete T->link[i][j].metric=(*f)(&T->link[i][j]);
la funzione all'interno della quale si trova č:
/*
This function performs the basic Dijkstra shortest-path calculation on a graph
in which all the links with insufficient bandwidth have been removed and the link metric
is determined by the cost function f.
*/
Path *ShortestPath(Topology *T, Flow *F, TLinkCostFunc f)
{
int i,j;
Path* path;

/* pruning of the links with insufficient bandwidth & setting up the link metric */

for (i=0; i<T->getNumNodes(); i++)
for (j=0; j<T->getNumNodes(); j++)
#ifdef LS_UPDATE
if (T->link[i][j].lastUpdateValue < F->getBwdr())
#else
if (T->link[i][j].availableBandwidth < F->getBwdr())
#endif
T->link[i][j].metric=-1.;
else
T->link[i][j].metric=(*f)(&T->link[i][j]);

e qs č la classe topology

class Topology
{
private:
int numNodes;
int numEdgeNodes; /* number of edge nodes */
int numQoSconstr;
void printTopology(FILE *f); /* print topology in an *opened* file */
public:
long accepted, /* number of accepted flows */
ac_error, /* number of flows incorrectly routed by algorithm */
rejected, /* number of flows rejected by algorithm */
*due2QoS; /* number of flows routed by algorithm but not
admitted due to QoS constraints */
Tlink **link;
int *edge_node;

int getTopology(const char *filename, bool symmetric); /* get topology from file */
void reset();
void printTopology(const char *filename);
void printTopology() { printTopology(stdout); }
int getNumNodes() {return numNodes;}
int getNumEdges() {return numEdgeNodes;}
int getNumQoSconstr() {return numQoSconstr;}
void releasePath(Flow *flow);
int setupPath(Flow *flow, long Warmup);
void updateAvgLoad(int n);
};

Penso che le informazioni che vi ho dato sono sufficienti, secosė non dovesse essere fatemi sapere