statalign.model.ext.plugins.structalign
Class Funcs

java.lang.Object
  extended by statalign.model.ext.plugins.structalign.Funcs

public class Funcs
extends java.lang.Object


Constructor Summary
Funcs()
           
 
Method Summary
static java.util.ArrayList<java.lang.Integer> collectLeaves(Vertex v)
           
static java.util.ArrayList<java.lang.Integer> findRefSubtrees(Tree tree, int refInd)
           
static double[][] getRowSub(double[][] coord, java.util.ArrayList<java.lang.Integer> rows)
           
static double[][] getSubMatrix(double[][] matrix, int[] rows, int[] cols)
           
static void initLSRotations(Tree tree, double[][][] coords, double[][] xlats, double[][] axes, double[] angles)
           
static org.apache.commons.math3.linear.RealVector meanVector(org.apache.commons.math3.linear.RealMatrix A)
          For an n X 3 coordinate matrix, calculate the 1 X 3 mean vector
static void moveDown(Vertex v, java.util.List<java.lang.Integer> inds)
           
static void moveUp(Vertex v, java.util.List<java.lang.Integer> inds)
           
static Vertex sampleVertex(Tree tree)
           
static void writeRotationFiles(Tree tree, double[][][] coords, double[][] xlats, double[][] axes, double[] angles)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Funcs

public Funcs()
Method Detail

getSubMatrix

public static double[][] getSubMatrix(double[][] matrix,
                                      int[] rows,
                                      int[] cols)

meanVector

public static org.apache.commons.math3.linear.RealVector meanVector(org.apache.commons.math3.linear.RealMatrix A)
For an n X 3 coordinate matrix, calculate the 1 X 3 mean vector

Parameters:
A - - coordinate matrix
Returns:
mean vector

sampleVertex

public static Vertex sampleVertex(Tree tree)

findRefSubtrees

public static java.util.ArrayList<java.lang.Integer> findRefSubtrees(Tree tree,
                                                                     int refInd)

moveUp

public static void moveUp(Vertex v,
                          java.util.List<java.lang.Integer> inds)

collectLeaves

public static java.util.ArrayList<java.lang.Integer> collectLeaves(Vertex v)

moveDown

public static void moveDown(Vertex v,
                            java.util.List<java.lang.Integer> inds)

writeRotationFiles

public static void writeRotationFiles(Tree tree,
                                      double[][][] coords,
                                      double[][] xlats,
                                      double[][] axes,
                                      double[] angles)

initLSRotations

public static void initLSRotations(Tree tree,
                                   double[][][] coords,
                                   double[][] xlats,
                                   double[][] axes,
                                   double[] angles)

getRowSub

public static double[][] getRowSub(double[][] coord,
                                   java.util.ArrayList<java.lang.Integer> rows)