public class SpTree
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
NODE_RATIO |
Constructor and Description |
---|
SpTree(org.nd4j.linalg.api.ndarray.INDArray data) |
SpTree(org.nd4j.linalg.api.ndarray.INDArray data,
java.util.Set<org.nd4j.linalg.api.ndarray.INDArray> indices) |
SpTree(org.nd4j.linalg.api.ndarray.INDArray data,
java.util.Set<org.nd4j.linalg.api.ndarray.INDArray> indices,
java.lang.String similarityFunction) |
SpTree(SpTree parent,
org.nd4j.linalg.api.ndarray.INDArray data,
org.nd4j.linalg.api.ndarray.INDArray corner,
org.nd4j.linalg.api.ndarray.INDArray width,
java.util.Set<org.nd4j.linalg.api.ndarray.INDArray> indices) |
SpTree(SpTree parent,
org.nd4j.linalg.api.ndarray.INDArray data,
org.nd4j.linalg.api.ndarray.INDArray corner,
org.nd4j.linalg.api.ndarray.INDArray width,
java.util.Set<org.nd4j.linalg.api.ndarray.INDArray> indices,
java.lang.String similarityFunction) |
Modifier and Type | Method and Description |
---|---|
void |
computeEdgeForces(org.nd4j.linalg.api.ndarray.INDArray rowP,
org.nd4j.linalg.api.ndarray.INDArray colP,
org.nd4j.linalg.api.ndarray.INDArray valP,
int N,
org.nd4j.linalg.api.ndarray.INDArray posF)
Compute edge forces using barns hut
|
void |
computeNonEdgeForces(int pointIndex,
double theta,
org.nd4j.linalg.api.ndarray.INDArray negativeForce,
com.google.common.util.concurrent.AtomicDouble sumQ)
Compute non edge forces using barnes hut
|
int |
depth()
The depth of the node
|
Cell |
getBoundary() |
org.nd4j.linalg.api.ndarray.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
|
public static final int NODE_RATIO
public SpTree(SpTree parent, org.nd4j.linalg.api.ndarray.INDArray data, org.nd4j.linalg.api.ndarray.INDArray corner, org.nd4j.linalg.api.ndarray.INDArray width, java.util.Set<org.nd4j.linalg.api.ndarray.INDArray> indices, java.lang.String similarityFunction)
public SpTree(org.nd4j.linalg.api.ndarray.INDArray data, java.util.Set<org.nd4j.linalg.api.ndarray.INDArray> indices, java.lang.String similarityFunction)
public SpTree(SpTree parent, org.nd4j.linalg.api.ndarray.INDArray data, org.nd4j.linalg.api.ndarray.INDArray corner, org.nd4j.linalg.api.ndarray.INDArray width, java.util.Set<org.nd4j.linalg.api.ndarray.INDArray> indices)
public SpTree(org.nd4j.linalg.api.ndarray.INDArray data, java.util.Set<org.nd4j.linalg.api.ndarray.INDArray> indices)
public SpTree(org.nd4j.linalg.api.ndarray.INDArray data)
public void subDivide()
public void computeNonEdgeForces(int pointIndex, double theta, org.nd4j.linalg.api.ndarray.INDArray negativeForce, com.google.common.util.concurrent.AtomicDouble sumQ)
pointIndex
- theta
- negativeForce
- sumQ
- public void computeEdgeForces(org.nd4j.linalg.api.ndarray.INDArray rowP, org.nd4j.linalg.api.ndarray.INDArray colP, org.nd4j.linalg.api.ndarray.INDArray valP, int N, org.nd4j.linalg.api.ndarray.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 org.nd4j.linalg.api.ndarray.INDArray getCenterOfMass()
public Cell getBoundary()
public int[] getIndex()
public int getCumSize()
public void setCumSize(int cumSize)
public int getNumChildren()
public void setNumChildren(int numChildren)