Package de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.structurelevel.hierarchical.agony
Class Agony<E>
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.structurelevel.hierarchical.agony.Agony<E>
- Type Parameters:
E
- Type of Node
Class for computing hierarchy ranks in directed graphs (with cycles).This is an implementation of the paper:
Faster way to agony - Discovering hierarchies in directed graphs by Nikolaj Tatti
which is an improved version of the paper:
Hierarchies in directed networks by Nikolaj Tatti
Code is available at https://users.ics.aalto.fi/ntatti/software.shtml. This implementation has a similar runtime performance than the C++ code and is one to one translated. An evaluation can be found at https://github.com/zhenv5/breaking_cycles_in_noisy_hierarchies.
Faster way to agony - Discovering hierarchies in directed graphs by Nikolaj Tatti
which is an improved version of the paper:
Hierarchies in directed networks by Nikolaj Tatti
Code is available at https://users.ics.aalto.fi/ntatti/software.shtml. This implementation has a similar runtime performance than the C++ code and is one to one translated. An evaluation can be found at https://github.com/zhenv5/breaking_cycles_in_noisy_hierarchies.
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private AgonyGraph
private int
private AgonyGraph
private final AgonyGraph
private static final org.slf4j.Logger
private int
private static final Pattern
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
addslack
(int eid) Returns a mapping between each node and its corresponding rank (represented as integers).Returns a mapping between the different ranks/levels and corresponding nodes (of the graph) in these levels.private void
cycledfs()
private void
deleteslack
(int eid) private void
extractcycle
(int eid) from
(int eid) private AgonyEdge
getEdge
(int i) getNode
(int i) private void
private void
initrank()
private void
minagony()
private int
readAdjacenyList
(File file) private void
relief
(int edge) private void
private int
size()
private int
slack
(int eid) private int
to
(int eid) private void
updaterelief
(List<AgonyNode<E>> nl)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
nodes
-
edges
-
graph
-
dag
-
euler
-
dual
private int dual -
primal
private int primal -
slacks
-
curslack
private int curslack -
SPLIT_PATTERN
-
-
Constructor Details
-
Agony
-
Agony
-
-
Method Details
-
readAdjacenyList
-
readEdges
-
computeAgony
Returns a mapping between each node and its corresponding rank (represented as integers). The rank starts at 0 and increases with each level.- Returns:
- a mapping between each node and its corresponding rank
-
computeAgonyReverseMap
Returns a mapping between the different ranks/levels and corresponding nodes (of the graph) in these levels. This is just the reverese mapping ofcomputeAgony()
.- Returns:
- a mapping between the different ranks/levels and corresponding nodes
-
writeagony
-
cycledfs
private void cycledfs() -
initagony
private void initagony() -
initrank
private void initrank() -
minagony
private void minagony() -
relief
private void relief(int edge) -
updaterelief
-
shiftrank
-
extractcycle
private void extractcycle(int eid) -
deleteslack
private void deleteslack(int eid) -
addslack
private void addslack(int eid) -
size
private int size() -
getNode
-
getEdge
-
slack
-
newslack
-
slack
private int slack(int eid) -
from
-
to
-