MCPcopy Create free account
hub / github.com/PythonOT/POT / getSource

Method getSource

ot/lp/network_simplex_simple.h:409–434  ·  view source on GitHub ↗

finally unused because too slow

Source from the content-addressed store, hash-verified

407
408 // finally unused because too slow
409 inline ArcsType getSource(const ArcsType arc) const
410 {
411 //ArcsType a = _source[arc];
412 //return a;
413
414 ArcsType n = _arc_num-arc-1;
415 if (_arc_mixing)
416 n = mixingCoeff*(n%mixingCoeff) + n/mixingCoeff;
417
418 ArcsType b;
419 if (n>=0)
420 b = _node_id(_graph.source(GR::arcFromId( n ) ));
421 else
422 {
423 n = arc+1-_arc_num;
424 if ( n<=_node_num)
425 b = _node_num;
426 else
427 if ( n>=_graph._n1)
428 b = _graph._n1;
429 else
430 b = _graph._n1-n;
431 }
432
433 return b;
434 }
435
436
437

Callers

nothing calls this directly

Calls 1

sourceMethod · 0.45

Tested by

no test coverage detected