imbalSubdiv_mu {treeDbalance} | R Documentation |
Calculation of the centroid distances
Description
imbalSubdiv_mu
- Calculates the node imbalance value "relative
centroid distance" of a vertex which subdivides the edge (p,v)
at
v+x \cdot (p-v)
with x \in [0,1]
. For example, we
can obtain the node imbalance value of v
if x=0
, and
x=0.5
would indicate a subdividing node exactly in the middle of
v
and p
.
Attention: If x=1
, this function will not calculate the node imbalance
value of p
with respect to its own incoming edge but with respect to
the edge (p,v)
itself. This enables us to estimate the
node imbalance integrals over the entire edge length.
imbalSubdiv_M
- Calculates the node imbalance value "expanded
relative centroid distance" of a vertex which subdivides the edge (p,v)
at v+x \cdot (p-v)
with x \in [0,1]
. For example, we
can obtain the node imbalance value of v
if x=0
, and x=0.5
would indicate a subdividing node exactly in the middle of v
and
p
.
Attention: If x=1
, this function will not calculate the node imbalance
value of p
with respect to its own incoming edge but with respect to
the edge (p,v)
itself. This enables us to estimate the
node imbalance integrals over the entire edge length.
dist3dToLine
- Calculates the distance of a point
to the infinite line between two points a
and b
in 3D space.
cross3d_prod
- Calculates the cross-product of two 3D vectors.
Usage
imbalSubdiv_mu(x, p, v, centr_v, centr_v_weight, edge_weight)
imbalSubdiv_M(x, p, v, centr_v, centr_v_weight, edge_weight)
dist3dToLine(point, a, b)
cross3d_prod(a, b)
Arguments
x |
Numeric value |
p |
Numeric vector of size 3 (3D coordinates of parent node |
v |
Numeric vector of size 3 (3D coordinates of node |
centr_v |
Numeric vector of size 3 (3D coordinates of the centroid of
the pending subtree of node |
centr_v_weight |
Numeric value >=0 (weight of the pending subtree of
node |
edge_weight |
Numeric value >=0 (weight of the edge |
point |
Numeric vector of size 3 (e.g. 3D coordinates). |
a |
Numeric vector of size 3 (e.g. 3D coordinates). |
b |
Numeric vector of size 3 (e.g. 3D coordinates). |
Value
imbalSubdiv_mu
Numeric value \in [0,1]
(higher values
indicate a higher degree of asymmetry).
imbalSubdiv_M
Numeric value \in [0,2]
(higher values
indicate a higher degree of asymmetry).
dist3dToLine
Numeric value.
cross3d_prod
Numeric vector of size 3.
Author(s)
Sophie Kersting, Luise Kühn
Examples
imbalSubdiv_mu(x=0.5,p=c(1,0,1),v=c(0,0,0),centr_v=c(0.5,0,0),
centr_v_weight=1,edge_weight=1)
imbalSubdiv_M(x=0.5,p=c(1,0,1),v=c(0,0,0),centr_v=c(0.5,0,0),
centr_v_weight=1,edge_weight=1)
dist3dToLine(point=c(1,1,1),a=c(0,0,0),b=c(1,2,2)) # 0.47140...
cross3d_prod(a=c(1,-1,1),b=c(1,2,2)) # c(-4, -1, 3)