| 608 | private: |
| 609 | |
| 610 | double basic_factor_value ( |
| 611 | unsigned long n1, |
| 612 | unsigned long n2, |
| 613 | unsigned long s1, |
| 614 | unsigned long s2 |
| 615 | ) const |
| 616 | { |
| 617 | if (n1 > n2) |
| 618 | { |
| 619 | swap(n1,n2); |
| 620 | swap(s1,s2); |
| 621 | } |
| 622 | |
| 623 | |
| 624 | // basically ignore the other node in this factor. The node we |
| 625 | // are ignoring is the center node of this star graph. So we basically |
| 626 | // let it always have a value of 1. |
| 627 | if (s2 == 1) |
| 628 | return numbers(n1,s1) + 1; |
| 629 | else |
| 630 | return numbers(n1,s1); |
| 631 | } |
| 632 | |
| 633 | }; |
| 634 |