Struct graph_neighbor_matching::GraphSimilarityMatrix [] [src]

pub struct GraphSimilarityMatrix<'a, F: NodeColorMatching + 'a> {
    // some fields omitted
}

Methods

impl<'a, F> GraphSimilarityMatrix<'a, F> where F: NodeColorMatching
[src]

fn new(graph_a: Graph<'a>, graph_b: Graph<'a>, node_color_matching: F) -> GraphSimilarityMatrix<'a, F>

fn next(&mut self)

Calculates the next iteration of the similarity matrix (x[k+1]).

fn iterate(&mut self, stop_after_iter: usize, eps: f32)

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) -> &DMat<f32>

fn num_iterations(&self) -> usize

fn min_nodes(&self) -> usize

fn max_nodes(&self) -> usize

fn optimal_node_assignment(&self) -> Vec<(usize, usize)>

fn score_outgoing_edge_weights(&self, node_assignment: &[(usize, usize)]) -> 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_sum_norm_min_degree(&self, node_assignment: Option<&[(usize, usize)]>) -> Closed01<f32>

Sums the optimal assignment of the node similarities and normalizes (divides) by the min degree of both graphs. Used as default in the paper.

fn score_sum_norm_max_degree(&self, node_assignment: Option<&[(usize, usize)]>) -> Closed01<f32>

Sums the optimal assignment of the node similarities and normalizes (divides) by the min degree of both graphs. Penalizes the difference in size of graphs.

fn score_average(&self) -> Closed01<f32>

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 + NodeColorMatching + 'a> Debug for GraphSimilarityMatrix<'a, F>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.