public class BernoulliEdgePermuter extends java.lang.Object implements EdgePermuter
| Constructor and Description |
|---|
BernoulliEdgePermuter(int numEdgesToPermute)
Constructs the edge permuter.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
initialize(Graph g) |
void |
permuteEdges(Graph graph)
Permutes the edges with default probability 1, meaning that if an edge is sample it will either be removed
or added depending on whether it exists already
|
void |
permuteEdges(Graph graph,
double probEdgeFlip)
Permutes the edges using a user-specified probability that an edge is removed or added.
|
public BernoulliEdgePermuter(int numEdgesToPermute)
numEdgesToPermute - the number of edges to permuteprotected void initialize(Graph g)
public void permuteEdges(Graph graph)
permuteEdges in interface EdgePermutergraph - the graph whose edges are to be permutedpublic void permuteEdges(Graph graph, double probEdgeFlip)
graph - the graph whose edges are to be permutedprobEdgeFlip - the probability that if a possible edge is sample it is removed, if it already exists
or added if it doesn't