|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.random.permuters.BernoulliEdgePermuter
An edge permuter that permutes edges by sampling uniformly at random a given number of possible edges and for each that exists that edge is removed and for each that doesn't exist that edge is added. The user can specify with what probability this should removal/addition process should happen.
Constructor Summary | |
BernoulliEdgePermuter(int numEdgesToPermute)
Constructs the edge permuter. |
Method Summary | |
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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BernoulliEdgePermuter(int numEdgesToPermute)
numEdgesToPermute
- the number of edges to permuteMethod Detail |
public void permuteEdges(Graph graph)
permuteEdges
in interface EdgePermuter
graph
- 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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |