public abstract class AbstractLayout3DPC<N extends Layout.Node> extends java.lang.Object implements SimilarityBasedLayouter3DPC
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractLayout3DPC.AbstractNode<N extends AbstractLayout3DPC.AbstractNode<N>>
Abstract node implementation.
|
private static class |
AbstractLayout3DPC.LowerTriangularAdapter
Class to use a lower-triangular similarity matrix for distance-based Prim's
spanning tree.
|
static class |
AbstractLayout3DPC.Parameterizer
Parameterization class.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) DependenceMeasure |
sim
Similarity measure
|
SIM_ID| Constructor and Description |
|---|
AbstractLayout3DPC(DependenceMeasure sim)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected N |
buildSpanningTree(int dim,
double[] mat,
Layout layout)
Build the minimum spanning tree.
|
protected N |
buildTree(int[] msg,
int cur,
int parent,
java.util.ArrayList<N> nodes)
Recursive tree build method.
|
static double[] |
computeSimilarityMatrix(DependenceMeasure sim,
Relation<? extends NumberVector> rel)
Compute a column-wise dependency matrix for the given relation.
|
static int |
findOptimalRoot(int[] msg)
Find the "optimal" root of a spanning tree.
|
DependenceMeasure |
getSimilarity()
Get the similarity measure to use.
|
abstract Layout |
layout(int dim,
double[] mat)
Main analysis method.
|
Layout |
layout(Relation<? extends NumberVector> rel)
Run the layouting algorithm.
|
(package private) abstract N |
makeNode(int dim,
java.util.List<N> children) |
protected int |
maxDepth(Layout.Node node)
Compute the depth of the graph.
|
DependenceMeasure sim
public AbstractLayout3DPC(DependenceMeasure sim)
sim - Similarity measurepublic DependenceMeasure getSimilarity()
SimilarityBasedLayouter3DPCgetSimilarity in interface SimilarityBasedLayouter3DPCpublic Layout layout(Relation<? extends NumberVector> rel)
Layouter3DPClayout in interface Layouter3DPC<NumberVector>rel - Relation to usepublic static double[] computeSimilarityMatrix(DependenceMeasure sim, Relation<? extends NumberVector> rel)
sim - Dependence measurerel - Vector relationpublic abstract Layout layout(int dim, double[] mat)
SimilarityBasedLayouter3DPClayout in interface SimilarityBasedLayouter3DPCdim - Dimensionalitymat - Similarity matrixprotected N buildSpanningTree(int dim, double[] mat, Layout layout)
mat - Similarity matrixlayout - Layout to write toprotected N buildTree(int[] msg, int cur, int parent, java.util.ArrayList<N> nodes)
msg - Minimum spanning graphcur - Current nodeparent - Parent nodenodes - Nodes array to fill - must be preinitialized with nulls!protected int maxDepth(Layout.Node node)
node - Current nodepublic static int findOptimalRoot(int[] msg)
This uses a simple message passing approach. Every node that has only one unset neighbor will emit a message to this neighbor. The node last to emit wins.
msg - Minimum spanning graph.Copyright © 2019 ELKI Development Team. License information.