[−][src]Trait graph_neighbor_matching::NodeColorMatching
Describes the closeness of two nodes based on their colors. The color can be thought of as a
node type. For example if you have a graph with nodes of type A and B which represent
completely different things, you'd assign them a node_color_matching
value of 0.0. This will
tell our algorithm not to try to match these two nodes and their edges.
Required methods
pub fn node_color_matching(
&self,
node_value_i: &T,
node_value_j: &T
) -> Closed01<f32>
[src]
&self,
node_value_i: &T,
node_value_j: &T
) -> Closed01<f32>
Determines how close or distant two nodes with node weights node_value_i
of graph A and
node_value_j
of graph B are. If they have different colors, this method could return 0.0
to describe that they are completely different nodes and as such the neighbor matching will
try to choose a different node.
NOTE: The returned value MUST be in the range [0, 1].