Struct graph_neighbor_matching::SimilarityMatrix
[−]
[src]
pub struct SimilarityMatrix<'a, F, G, E, N> where
F: NodeColorMatching<N>,
G: Graph<EDGE = E, NODE = N> + 'a,
E: Edges,
N: Clone, { /* fields omitted */ }
Methods
impl<'a, F, G, E, N> SimilarityMatrix<'a, F, G, E, N> where
F: NodeColorMatching<N>,
G: Graph<EDGE = E, NODE = N>,
E: Edges,
N: Clone,
[src]
F: NodeColorMatching<N>,
G: Graph<EDGE = E, NODE = N>,
E: Edges,
N: Clone,
fn new(
graph_a: &'a G,
graph_b: &'a G,
node_color_matching: F
) -> SimilarityMatrix<'a, F, G, E, N>
[src]
graph_a: &'a G,
graph_b: &'a G,
node_color_matching: F
) -> SimilarityMatrix<'a, F, G, E, N>
fn next(&mut self)
[src]
Calculates the next iteration of the similarity matrix (x[k+1]).
fn iterate(&mut self, stop_after_iter: usize, eps: f32)
[src]
Iteratively calculate the similarity matrix.
stop_after_iter
: Stop after iteration (Calculate x(stop_after_iter))
eps
: When to stop the iteration
fn matrix(&self) -> &DMatrix<f32>
[src]
fn num_iterations(&self) -> usize
[src]
fn min_nodes(&self) -> usize
[src]
fn max_nodes(&self) -> usize
[src]
fn optimal_node_assignment(&self) -> Vec<(usize, usize)>
[src]
fn score_outgoing_edge_weights_sum_norm(
&self,
node_assignment: &[(usize, usize)],
norm: ScoreNorm
) -> Closed01<f32>
[src]
&self,
node_assignment: &[(usize, usize)],
norm: ScoreNorm
) -> Closed01<f32>
Calculate a measure how good the edge weights match up.
We start by calculating the optimal node assignment between nodes of graph A and graph B, then compare all outgoing edges of similar-assigned nodes by again using an assignment between the edge-weight differences of all edge pairs.
fn score_optimal_sum_norm(
&self,
node_assignment: Option<&[(usize, usize)]>,
norm: ScoreNorm
) -> Closed01<f32>
[src]
&self,
node_assignment: Option<&[(usize, usize)]>,
norm: ScoreNorm
) -> Closed01<f32>
Sums the optimal assignment of the node similarities and normalizes (divides) by the min/max degree of both graphs. ScoreNorm::MinDegree is used as default in the paper.
fn score_average(&self) -> Closed01<f32>
[src]
Calculates the average over the whole node similarity matrix. This is faster, as no assignment has to be found. "Graphs with greater number of automorphisms would be considered to be more self-similar than graphs without automorphisms."
Trait Implementations
impl<'a, F: Debug, G: Debug, E: Debug, N: Debug> Debug for SimilarityMatrix<'a, F, G, E, N> where
F: NodeColorMatching<N>,
G: Graph<EDGE = E, NODE = N> + 'a,
E: Edges,
N: Clone,
[src]
F: NodeColorMatching<N>,
G: Graph<EDGE = E, NODE = N> + 'a,
E: Edges,
N: Clone,