Class: GRATR::UndirectedMultiGraph

Inherits:
UndirectedGraph show all
Defined in:
lib/gratr/undirected_graph.rb

Overview

This is a UndirectedGraph that allows for parallel edges and loops

Instance Method Summary collapse

Methods inherited from UndirectedGraph

#balanced?, #chromatic_number, #degree, #directed?, #edge_class, #interval?, #permutation?, #remove_edge!, #split?, #triangulated?

Methods included from Graph::Comparability

#comparability?, #gamma_decomposition, #transitive_orientation

Methods included from Graph::Biconnected

#biconnected

Methods included from Graph::Search

#acyclic?, #astar, #best_first, #bfs, #bfs_spanning_forest, #bfs_tree_from_vertex, #cyclic?, #dfs, #dfs_spanning_forest, #dfs_tree_from_vertex, #lexicograph_bfs, #method_missing, #pre_search_method_missing, #spanning_forest, #topsort, #tree_from_vertex

Methods included from AdjacencyGraph

#add_edge!, #add_vertex!, #adjacent, #edge?, #edges, #graph_adjacent, included, #remove_edge!, #remove_vertex!, #vertex?, #vertices

Methods included from Graph

#+, #-, #<<, #==, #add_edge, #add_edges, #add_edges!, #add_vertex, #add_vertices, #add_vertices!, #adjacent, #adjacent?, #closed_pth_neighborhood, #complement, #degree, #dotty, #each, #edge?, #empty?, #eql?, #in_degree, #include?, #induced_subgraph, #inspect, #max_degree, #max_in_degree, #max_out_degree, #merge, #min_degree, #min_in_degree, #min_out_degree, #neighborhood, #num_edges, #num_vertices, #open_pth_neighborhood, #out_degree, #regular?, #remove_edge, #remove_edges, #remove_edges!, #remove_vertex, #remove_vertices, #remove_vertices!, #set_neighborhood, #size, #to_dot, #to_dot_graph, #to_s, #vertex?, #write_to_graphic_file

Methods included from GraphAPI

#add_edge!, #add_vertex!, #chromatic_number, #directed?, #edge_class, #edges, #remove_edge!, #remove_vertex!, #vertices

Methods included from Labels

#[], #[]=, #clear_all_labels, #delete_label, #edge_label, #edge_label_delete, #edge_label_set, #vertex_label, #vertex_label_delete, #vertex_label_set

Constructor Details

#initialize(*params) ⇒ UndirectedMultiGraph

Returns a new instance of UndirectedMultiGraph.

Raises:

  • (ArgumentError)


144
145
146
147
148
149
# File 'lib/gratr/undirected_graph.rb', line 144

def initialize(*params)
  raise ArgumentError if params.any? do |p| 
   !(p.kind_of? Graph or p.kind_of? Array)
  end
  super(:parallel_edges, :loops, *params)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class GRATR::Graph::Search