public class HierarchicalPartitioning extends Object implements Partitioner
Modifier and Type | Field and Description |
---|---|
protected static String |
relType |
protected static String |
weightType |
Constructor and Description |
---|
HierarchicalPartitioning() |
HierarchicalPartitioning(int size) |
Modifier and Type | Method and Description |
---|---|
static int |
coarseSizeThreshold(int noPartitions) |
protected static HashRelationshipWeighter |
createCoarseGraph(Graph g,
Iterable<org.linqs.psl.utils.graph.partition.hierarchical.SuperNode> supernodes,
Map<Node,org.linqs.psl.utils.graph.partition.hierarchical.SuperNode> assign,
RelationshipWeighter rweight) |
double |
getBalanceExponent() |
int |
getNoPartitioningTrials() |
int |
getSize()
Returns the current size of produced partitions
|
List<List<Node>> |
partition(Graph g,
Iterable<? extends Node> nodes,
RelationshipWeighter rweight)
Partition the set of nodes into the specified number of blocks aiming to minimize the edge
cut as specified by the RelationshipWeighter.
|
double |
partition(Graph g,
Iterable<? extends Node> nodes,
RelationshipWeighter rweight,
List<? extends Collection<Node>> partition)
Partition the set of nodes into the specified number of blocks aiming to minimize the edge
cut as specified by the RelationshipWeighter.
|
double |
partition(Graph g,
Iterable<? extends Node> nodes,
RelationshipWeighter rweight,
NodeWeighter nweight,
List<? extends Collection<Node>> partition) |
void |
setBalanceExponent(double balanceExponent) |
void |
setNoPartitioningTrials(int trials) |
void |
setSize(int size)
Define the size of the partition, i.e.
|
protected static final String relType
protected static final String weightType
public HierarchicalPartitioning(int size)
public HierarchicalPartitioning()
public void setNoPartitioningTrials(int trials)
public int getNoPartitioningTrials()
public double getBalanceExponent()
public void setBalanceExponent(double balanceExponent)
public static final int coarseSizeThreshold(int noPartitions)
public int getSize()
Partitioner
getSize
in interface Partitioner
public void setSize(int size)
Partitioner
setSize
in interface Partitioner
size
- Size of the partitionpublic List<List<Node>> partition(Graph g, Iterable<? extends Node> nodes, RelationshipWeighter rweight)
Partitioner
partition
in interface Partitioner
nodes
- Iterable over a set of nodes. It is assumed, that no node occurs multiple times during iteration.rweight
- RelationshipWeighter defining the strength of relationships taken into account by the partitioning algorithm.public double partition(Graph g, Iterable<? extends Node> nodes, RelationshipWeighter rweight, List<? extends Collection<Node>> partition)
Partitioner
partition
in interface Partitioner
nodes
- Iterable over a set of nodes. It is assumed, that no node occurs multiple times during iteration.rweight
- RelationshipWeighter defining the strength of relationships taken into account by the partitioning algorithm.partition
- Initialized partition containerpublic double partition(Graph g, Iterable<? extends Node> nodes, RelationshipWeighter rweight, NodeWeighter nweight, List<? extends Collection<Node>> partition)
protected static HashRelationshipWeighter createCoarseGraph(Graph g, Iterable<org.linqs.psl.utils.graph.partition.hierarchical.SuperNode> supernodes, Map<Node,org.linqs.psl.utils.graph.partition.hierarchical.SuperNode> assign, RelationshipWeighter rweight)
Copyright © 2018 University of California, Santa Cruz. All rights reserved.