Constructs an even graph
mk_even_graph.Rd
~~ Methods for function mk_even_graph
. Each of these return an instance of even_graph
, where all nodes are of even degree. The result satisfies is_even_graph
.
The resulting graph yields an euler tour.
Methods
- self = "graphNEL",use_weights=TRUE,add_edges=TRUE
This is the workhorse method. If
self
does not satisfyis_even_graph
, the graph is forced to be even by one of the folowing. If add_edges is TRUE, the odd nodes are paired off and a new edge added between each pair, possibly duplicating an existing edge. If add_edges is a vector of the odd nodes, they are paired off in this order. If add_edges is FALSE a new dummy node is added with edges going to all odd nodes.- self = "matrix",use_weights=TRUE,add_edges=TRUE
first constructs a complete graph using
mk_complete_graph
, which is then augmented to be even.- self = "numeric",use_weights=FALSE,add_edges=TRUE
first constructs a complete graph using
mk_complete_graph
, which is then augmented to be even.- self = "ANY",use_weights=TRUE,add_edges=TRUE
first constructs a complete graph using
mk_complete_graph
, which is then augmented to be even.- self = "even_graph",add_edges=TRUE
returns self.
References
see overview