finally unused because too slow
| 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 |