MCPcopy Create free account
hub / github.com/davisking/dlib / basic_factor_value

Method basic_factor_value

dlib/test/find_max_factor_graph_nmplp.cpp:610–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

swapFunction · 0.70

Tested by

no test coverage detected