public class SpTree extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static int |
NODE_RATIO |
static String |
workspaceExternal |
Constructor and Description |
---|
SpTree(INDArray data) |
SpTree(INDArray data,
Collection<INDArray> indices) |
SpTree(INDArray data,
Collection<INDArray> indices,
String similarityFunction) |
SpTree(SpTree parent,
INDArray data,
INDArray corner,
INDArray width,
Collection<INDArray> indices) |
SpTree(SpTree parent,
INDArray data,
INDArray corner,
INDArray width,
Collection<INDArray> indices,
String similarityFunction) |
Modifier and Type | Method and Description |
---|---|
void |
computeEdgeForces(INDArray rowP,
INDArray colP,
INDArray valP,
int N,
INDArray posF)
Compute edge forces using barnes hut
|
void |
computeNonEdgeForces(int pointIndex,
double theta,
INDArray negativeForce,
org.nd4j.shade.guava.util.concurrent.AtomicDouble sumQ)
Compute non edge forces using barnes hut
|
int |
depth()
The depth of the node
|
Cell |
getBoundary() |
INDArray |
getCenterOfMass() |
SpTree[] |
getChildren() |
int |
getCumSize() |
int |
getD() |
int[] |
getIndex() |
int |
getNumChildren() |
boolean |
isCorrect()
Verifies the structure of the tree (does bounds checking on each node)
|
boolean |
isLeaf() |
void |
setCumSize(int cumSize) |
void |
setNumChildren(int numChildren) |
void |
subDivide()
Subdivide the node in to
4 children
|
MemoryWorkspace |
workspace() |
public static final String workspaceExternal
public static final int NODE_RATIO
public SpTree(SpTree parent, INDArray data, INDArray corner, INDArray width, Collection<INDArray> indices, String similarityFunction)
public SpTree(INDArray data, Collection<INDArray> indices, String similarityFunction)
public SpTree(SpTree parent, INDArray data, INDArray corner, INDArray width, Collection<INDArray> indices)
public SpTree(INDArray data, Collection<INDArray> indices)
public SpTree(INDArray data)
public MemoryWorkspace workspace()
public void subDivide()
public void computeNonEdgeForces(int pointIndex, double theta, INDArray negativeForce, org.nd4j.shade.guava.util.concurrent.AtomicDouble sumQ)
pointIndex
- theta
- negativeForce
- sumQ
- public void computeEdgeForces(INDArray rowP, INDArray colP, INDArray valP, int N, INDArray posF)
rowP
- a vectorcolP
- valP
- N
- the number of elementsposF
- the positive forcepublic boolean isLeaf()
public boolean isCorrect()
public int depth()
public SpTree[] getChildren()
public int getD()
public INDArray getCenterOfMass()
public Cell getBoundary()
public int[] getIndex()
public int getCumSize()
public void setCumSize(int cumSize)
public int getNumChildren()
public void setNumChildren(int numChildren)
Copyright © 2020. All rights reserved.