public class GraphSet extends Object implements Comparator<GraphSet>, Comparable<GraphSet>, Iterable<Edge>
Represents the graphs between the nodes.
Constructor and Description |
---|
GraphSet()
Creates a new empty graph set.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Edge g) |
boolean |
addAll(Collection<? extends Edge> g) |
boolean |
allTargetsReached()
check if all members of the anonymity set hve been reached at least once.
|
int |
compare(GraphSet g1,
GraphSet g2)
Compares two graph sets for equality.
|
int |
compareTo(GraphSet gs)
Compares this graph set with another graph set.
|
boolean |
contains(Edge g)
Check for a edge covering the mentioned points.
|
String |
dump()
Get a string representation of the graph set.
|
boolean |
equals(Object g) |
Edge |
get(int i) |
IdentityStoreBlock |
getAnonIdentity(int i)
Get an identity from the specified anonymity set.
|
IdentityStoreBlock |
getAnonymity(int i) |
int |
getAnonymityIndex(IdentityStoreBlock isb) |
IdentityStoreBlock[] |
getAnonymitySet() |
int |
getAnonymitySetSize() |
GraphSet[] |
getRoutes()
Get a set of all graphs determined.
|
RoutingCombo |
getRoutingBlock() |
IdentityStoreBlock |
getSource() |
IdentityStoreBlock |
getTarget() |
int |
hashCode() |
Iterator<Edge> |
iterator() |
void |
setAnonymitySet(IdentityStoreBlock[] anonymitySet)
Sets the list of identities to be used for the anonymity set.
|
void |
setSource(IdentityStoreBlock source)
Sets the source identity of this graph.
|
void |
setTarget(IdentityStoreBlock target)
Sets the target identity of this graph.
|
int |
size() |
boolean |
targetReached(IdentityStoreBlock is)
Checks if a specific identity store block is already reached by this graph.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
forEach, spliterator
public IdentityStoreBlock[] getAnonymitySet()
public void setAnonymitySet(IdentityStoreBlock[] anonymitySet)
Sets the list of identities to be used for the anonymity set.
anonymitySet
- a list of identities to be usedpublic IdentityStoreBlock getAnonymity(int i)
public IdentityStoreBlock getSource()
public void setSource(IdentityStoreBlock source)
Sets the source identity of this graph.
source
- the source identity to be setIllegalArgumentException
- if the source is not part of the anonymity setNullPointerException
- if the source is nullpublic IdentityStoreBlock getTarget()
public void setTarget(IdentityStoreBlock target)
Sets the target identity of this graph.
target
- the target identity to be setIllegalArgumentException
- if the target is not part of the anonymity setNullPointerException
- if the target is nullpublic int getAnonymitySetSize()
public int getAnonymityIndex(IdentityStoreBlock isb)
public boolean add(Edge g)
public boolean contains(Edge g)
Check for a edge covering the mentioned points.
g
- the edge to be searched forpublic boolean addAll(Collection<? extends Edge> g)
public IdentityStoreBlock getAnonIdentity(int i)
Get an identity from the specified anonymity set.
i
- the index of the identity to obtainArrayIndexOutOfBoundsException
- if i is outside the bounds of the anonymity setpublic boolean allTargetsReached()
check if all members of the anonymity set hve been reached at least once.
public boolean targetReached(IdentityStoreBlock is)
Checks if a specific identity store block is already reached by this graph.
is
- the identity store blockNullPointerException
- if the specified identity stor block is nullpublic GraphSet[] getRoutes()
Get a set of all graphs determined.
public int compare(GraphSet g1, GraphSet g2)
Compares two graph sets for equality.
compare
in interface Comparator<GraphSet>
g1
- the first graph set required for comparisong2
- the secondgraph set required for comparisonpublic int compareTo(GraphSet gs)
Compares this graph set with another graph set.
compareTo
in interface Comparable<GraphSet>
gs
- the second graph set for comparisonpublic boolean equals(Object g)
equals
in interface Comparator<GraphSet>
equals
in class Object
public String dump()
Get a string representation of the graph set.
public RoutingCombo getRoutingBlock()
public int size()
public Edge get(int i)
Copyright © 2023. All rights reserved.