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

Method getSource

ot/lp/network_simplex_simple_omp.h:436–461  ·  view source on GitHub ↗

finally unused because too slow

Source from the content-addressed store, hash-verified

434
435 // finally unused because too slow
436 inline ArcsType getSource(const ArcsType arc) const
437 {
438 //ArcsType a = _source[arc];
439 //return a;
440
441 ArcsType n = _arc_num - arc - 1;
442 if (_arc_mixing)
443 n = mixingCoeff*(n%mixingCoeff) + n / mixingCoeff;
444
445 ArcsType b;
446 if (n >= 0)
447 b = _node_id(_graph.source(GR::arcFromId(n)));
448 else
449 {
450 n = arc + 1 - _arc_num;
451 if (n <= _node_num)
452 b = _node_num;
453 else
454 if (n >= _graph._n1)
455 b = _graph._n1;
456 else
457 b = _graph._n1 - n;
458 }
459
460 return b;
461 }
462
463
464

Callers

nothing calls this directly

Calls 1

sourceMethod · 0.45

Tested by

no test coverage detected