Package gov.nih.mipav.model.algorithms
Class StochasticForests
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.StochasticForests
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.awt.event.WindowListener,java.lang.Runnable,java.util.EventListener
public class StochasticForests extends AlgorithmBase
-
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description private doublealphaprivate java.util.Vector<java.lang.String>always_split_variable_namesprivate java.lang.Stringcase_weights_file(package private) doubleDEFAULT_ALPHA(package private) StochasticForests.ImportanceModeDEFAULT_IMPORTANCE_MODE(package private) intDEFAULT_MIN_NODE_SIZE_CLASSIFICATION(package private) intDEFAULT_MIN_NODE_SIZE_PROBABILITY(package private) intDEFAULT_MIN_NODE_SIZE_REGRESSION(package private) intDEFAULT_MIN_NODE_SIZE_SURVIVAL(package private) doubleDEFAULT_MINPROP(package private) intDEFAULT_NUM_RANDOM_SPLITS(package private) intDEFAULT_NUM_THREADS(package private) intDEFAULT_NUM_TREE(package private) StochasticForests.PredictionTypeDEFAULT_PREDICTIONTYPE(package private) StochasticForests.SplitRuleDEFAULT_SPLITRULEprivate java.lang.Stringdependent_variable_nameprivate booleanholdoutprivate StochasticForests.ImportanceModeimportance_modeprivate java.lang.Stringinput_fileprivate java.lang.Stringload_forest_filenamestatic doublelogprop(package private) static int[]maskprivate StochasticForests.MemoryModememory_modeprivate booleanmemory_saving_splittingprivate intmin_node_sizeprivate doubleminpropprivate intmtryprivate intnum_random_splitsprivate intnum_threadsprivate intnum_trees(package private) static int[]offsetprivate java.lang.Stringoutput_prefixprivate booleanpredict_allprivate StochasticForests.PredictionTypeprediction_typeprivate booleanprobability(package private) doubleQ_THRESHOLDstatic intRAND_MAXprivate doublesample_fractionprivate booleansample_with_replacementprivate longseedprivate java.lang.Stringsplit_select_weights_fileprivate StochasticForests.SplitRulesplitrule(package private) doubleSTATUS_INTERVALprivate java.lang.Stringstatus_variable_nameprivate booleantestMainprivate booleantestUtilityprivate StochasticForests.TreeTypetreetypeprivate java.util.Vector<java.lang.String>unordered_variable_namesprivate booleanverbose_outprivate booleanwrite-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description StochasticForests()StochasticForests(StochasticForests.TreeType treetype, boolean probability, boolean verbose_out, java.lang.String dependent_variable_name, StochasticForests.MemoryMode memory_mode, java.lang.String input_file, int mtry, java.lang.String output_prefix, int num_trees, long seed, int num_threads, java.lang.String load_forest_filename, StochasticForests.ImportanceMode importance_mode, int min_node_size, java.lang.String split_select_weights_file, java.util.Vector<java.lang.String> always_split_variable_names, java.lang.String status_variable_name, boolean sample_with_replacement, java.util.Vector<java.lang.String> unordered_variable_names, boolean memory_saving_splitting, StochasticForests.SplitRule splitrule, java.lang.String case_weights_file, boolean predict_all, double sample_fraction, double alpha, double minprop, boolean holdout, StochasticForests.PredictionType prediction_type, int num_random_splits, boolean write)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.Vector<java.lang.Double>adjustPvalues(java.util.Vector<java.lang.Double> unadjusted_pvalues)private java.lang.StringbeautifyTime(int seconds)private booleancheckPositiveIntegers(java.util.Vector<java.lang.Double> all_values)private java.lang.StringcheckUnorderedVariables(StochasticForests.Data data, java.util.Vector<java.lang.String> unordered_variable_names)private doublecomputeConcordanceIndex(StochasticForests.Data data, java.util.Vector<java.lang.Double> sum_chf, int dependent_varID, int status_varID, java.util.Vector<java.lang.Integer> sample_IDs)private voiddrawWithoutReplacementFisherYates(java.util.Vector<java.lang.Integer> result, java.util.Random random, int max, java.util.Vector<java.lang.Integer> skip, int num_samples)private voiddrawWithoutReplacementSimple(java.util.Vector<java.lang.Integer> result, java.util.Random random, int max, java.util.Vector<java.lang.Integer> skip, int num_samples)private voiddrawWithoutReplacementSkip(java.util.Vector<java.lang.Integer> result, java.util.Random random, int max, java.util.Vector<java.lang.Integer> skip, int num_samples)private voiddrawWithoutReplacementWeighted(java.util.Vector<java.lang.Integer> result, java.util.Random random, int max_index, int num_samples, java.util.Vector<java.lang.Double> weights)private voiddrawWithoutReplacementWeighted(java.util.Vector<java.lang.Integer> result, java.util.Random random, java.util.Vector<java.lang.Integer> indices, int num_samples, java.util.Vector<java.lang.Double> weights)private doubledstdnorm(double x)private voidequalSplit(java.util.Vector<java.lang.Integer> result, int start, int end, int num_parts)private booleanequalVectorDouble(java.util.Vector<java.lang.Double> v1, java.util.Vector<java.lang.Double> v2, java.lang.String str)private booleanequalVectorInteger(java.util.Vector<java.lang.Integer> v1, java.util.Vector<java.lang.Integer> v2, java.lang.String str)private booleanequalVectorVectorDouble(java.util.Vector<java.util.Vector<java.lang.Double>> v1, java.util.Vector<java.util.Vector<java.lang.Double>> v2, java.lang.String str)private booleanequalVectorVectorInteger(java.util.Vector<java.util.Vector<java.lang.Integer>> v1, java.util.Vector<java.util.Vector<java.lang.Integer>> v2, java.lang.String str)private doubleerf(double x)private booleanexpectNear(double val1, double val2, double error, java.lang.String str)(package private) voidloadDoubleVectorFromFile(java.util.Vector<java.lang.Double> result, java.lang.String filename)private java.util.Vector<java.lang.Double>logrankScores(java.util.Vector<java.lang.Double> time, java.util.Vector<java.lang.Double> status)private voidmaxstat(java.util.Vector<java.lang.Double> scores, java.util.Vector<java.lang.Double> x, java.util.Vector<java.lang.Integer> indices, double[] best_maxstat, double[] best_split_value, double minprop, double maxprop)private doublemaxstatPValueLau92(double b, double minprop, double maxprop)private doublemaxstatPValueLau94(double b, double minprop, double maxprop, int N, java.util.Vector<java.lang.Integer> m)private doublemaxstatPValueUnadjusted(double b)private intmostFrequentClass(java.util.Vector<java.lang.Integer> class_count, java.util.Random random)Returns the most frequent class index of a vector with counts for the classes.private intmostFrequentDClass(java.util.Vector<java.lang.Double> class_count, java.util.Random random)Returns the most frequent class index of a vector with counts for the classes.private doublemostFrequentValue(java.util.HashMap<java.lang.Double,java.lang.Integer> class_count, java.util.Random random)private java.util.Vector<java.lang.Integer>numSamplesLeftOfCutpoint(java.util.Vector<java.lang.Double> x, java.util.Vector<java.lang.Integer> indices)private java.util.Vector<java.lang.Integer>order(java.util.Vector<java.lang.Double> x, boolean decreasing)private doublepstdnorm(double x)(package private) java.util.Vector<java.lang.Double>rank(java.util.Vector<java.lang.Double> values)Sample ranks starting from 1.private voidreadBVector1D(java.util.Vector<java.lang.Boolean> result, java.io.BufferedReader br)Read a 1d vector written by saveVector1D() from filestream.private voidreadDVector1D(java.util.Vector<java.lang.Double> result, java.io.BufferedReader br)Read a 1d vector written by saveVector1D() from filestream.private voidreadDVector2D(java.util.Vector<java.util.Vector<java.lang.Double>> result, java.io.BufferedReader br)Read a 2d vector written by saveVector2D() from filestream.private voidreadVector1D(java.util.Vector<java.lang.Integer> result, java.io.BufferedReader br)Read a 1d vector written by saveVector1D() from filestream.private voidreadVector2D(java.util.Vector<java.util.Vector<java.lang.Integer>> result, java.io.BufferedReader br)Read a 2d vector written by saveVector2D() from filestream.private introundToNextMultiple(int value, int multiple)voidrunAlgorithm()Actually runs the algorithm.private voidsaveBVector1D(java.util.Vector<java.lang.Boolean> vector, java.io.BufferedWriter bw)Write a 1d vector to filestream.private voidsaveDVector1D(java.util.Vector<java.lang.Double> vector, java.io.BufferedWriter bw)Write a 1d vector to filestream.private voidsaveDVector2D(java.util.Vector<java.util.Vector<java.lang.Double>> vector, java.io.BufferedWriter bw)Write a 2d vector to filestream.private voidsaveVector1D(java.util.Vector<java.lang.Integer> vector, java.io.BufferedWriter bw)Write a 1d vector to filestream.private voidsaveVector2D(java.util.Vector<java.util.Vector<java.lang.Integer>> vector, java.io.BufferedWriter bw)Write a 2d vector to filestream.private voidshuffle(java.util.Vector<java.lang.Integer> v, java.util.Random random)private voidshuffleAndSplit(java.util.Vector<java.lang.Integer> first_part, java.util.Vector<java.lang.Integer> second_part, int n_all, int n_first, java.util.Random random)private voidshuffleAndSplitAppend(java.util.Vector<java.lang.Integer> first_part, java.util.Vector<java.lang.Integer> second_part, int n_all, int n_first, java.util.Vector<java.lang.Integer> mapping, java.util.Random random)private voidsplitString(java.util.Vector<java.lang.String> result, java.lang.String input, java.lang.String split_string)private java.lang.StringuintToString(int number)-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
mask
static final int[] mask
-
offset
static final int[] offset
-
DEFAULT_NUM_TREE
final int DEFAULT_NUM_TREE
- See Also:
- Constant Field Values
-
DEFAULT_NUM_THREADS
final int DEFAULT_NUM_THREADS
- See Also:
- Constant Field Values
-
DEFAULT_IMPORTANCE_MODE
final StochasticForests.ImportanceMode DEFAULT_IMPORTANCE_MODE
-
DEFAULT_MIN_NODE_SIZE_CLASSIFICATION
final int DEFAULT_MIN_NODE_SIZE_CLASSIFICATION
- See Also:
- Constant Field Values
-
DEFAULT_MIN_NODE_SIZE_REGRESSION
final int DEFAULT_MIN_NODE_SIZE_REGRESSION
- See Also:
- Constant Field Values
-
DEFAULT_MIN_NODE_SIZE_SURVIVAL
final int DEFAULT_MIN_NODE_SIZE_SURVIVAL
- See Also:
- Constant Field Values
-
DEFAULT_MIN_NODE_SIZE_PROBABILITY
final int DEFAULT_MIN_NODE_SIZE_PROBABILITY
- See Also:
- Constant Field Values
-
DEFAULT_SPLITRULE
final StochasticForests.SplitRule DEFAULT_SPLITRULE
-
DEFAULT_ALPHA
final double DEFAULT_ALPHA
- See Also:
- Constant Field Values
-
DEFAULT_MINPROP
final double DEFAULT_MINPROP
- See Also:
- Constant Field Values
-
DEFAULT_PREDICTIONTYPE
final StochasticForests.PredictionType DEFAULT_PREDICTIONTYPE
-
DEFAULT_NUM_RANDOM_SPLITS
final int DEFAULT_NUM_RANDOM_SPLITS
- See Also:
- Constant Field Values
-
STATUS_INTERVAL
final double STATUS_INTERVAL
- See Also:
- Constant Field Values
-
Q_THRESHOLD
final double Q_THRESHOLD
- See Also:
- Constant Field Values
-
RAND_MAX
public static int RAND_MAX
-
logprop
public static double logprop
-
testUtility
private boolean testUtility
-
testMain
private boolean testMain
-
treetype
private StochasticForests.TreeType treetype
-
probability
private boolean probability
-
verbose_out
private boolean verbose_out
-
dependent_variable_name
private java.lang.String dependent_variable_name
-
memory_mode
private StochasticForests.MemoryMode memory_mode
-
input_file
private java.lang.String input_file
-
mtry
private int mtry
-
output_prefix
private java.lang.String output_prefix
-
num_trees
private int num_trees
-
seed
private long seed
-
num_threads
private int num_threads
-
load_forest_filename
private java.lang.String load_forest_filename
-
importance_mode
private StochasticForests.ImportanceMode importance_mode
-
min_node_size
private int min_node_size
-
split_select_weights_file
private java.lang.String split_select_weights_file
-
always_split_variable_names
private java.util.Vector<java.lang.String> always_split_variable_names
-
status_variable_name
private java.lang.String status_variable_name
-
sample_with_replacement
private boolean sample_with_replacement
-
unordered_variable_names
private java.util.Vector<java.lang.String> unordered_variable_names
-
memory_saving_splitting
private boolean memory_saving_splitting
-
splitrule
private StochasticForests.SplitRule splitrule
-
case_weights_file
private java.lang.String case_weights_file
-
predict_all
private boolean predict_all
-
sample_fraction
private double sample_fraction
-
alpha
private double alpha
-
minprop
private double minprop
-
holdout
private boolean holdout
-
prediction_type
private StochasticForests.PredictionType prediction_type
-
num_random_splits
private int num_random_splits
-
write
private boolean write
-
-
Constructor Detail
-
StochasticForests
public StochasticForests()
-
StochasticForests
public StochasticForests(StochasticForests.TreeType treetype, boolean probability, boolean verbose_out, java.lang.String dependent_variable_name, StochasticForests.MemoryMode memory_mode, java.lang.String input_file, int mtry, java.lang.String output_prefix, int num_trees, long seed, int num_threads, java.lang.String load_forest_filename, StochasticForests.ImportanceMode importance_mode, int min_node_size, java.lang.String split_select_weights_file, java.util.Vector<java.lang.String> always_split_variable_names, java.lang.String status_variable_name, boolean sample_with_replacement, java.util.Vector<java.lang.String> unordered_variable_names, boolean memory_saving_splitting, StochasticForests.SplitRule splitrule, java.lang.String case_weights_file, boolean predict_all, double sample_fraction, double alpha, double minprop, boolean holdout, StochasticForests.PredictionType prediction_type, int num_random_splits, boolean write)
-
-
Method Detail
-
order
private java.util.Vector<java.lang.Integer> order(java.util.Vector<java.lang.Double> x, boolean decreasing)
-
rank
java.util.Vector<java.lang.Double> rank(java.util.Vector<java.lang.Double> values)
Sample ranks starting from 1. Ties are given the average rank.- Parameters:
values- Values to rank- Returns:
- Ranks of input values
-
roundToNextMultiple
private int roundToNextMultiple(int value, int multiple)
-
shuffle
private void shuffle(java.util.Vector<java.lang.Integer> v, java.util.Random random)
-
equalSplit
private void equalSplit(java.util.Vector<java.lang.Integer> result, int start, int end, int num_parts)
-
loadDoubleVectorFromFile
void loadDoubleVectorFromFile(java.util.Vector<java.lang.Double> result, java.lang.String filename)
-
drawWithoutReplacementSkip
private void drawWithoutReplacementSkip(java.util.Vector<java.lang.Integer> result, java.util.Random random, int max, java.util.Vector<java.lang.Integer> skip, int num_samples)
-
drawWithoutReplacementSimple
private void drawWithoutReplacementSimple(java.util.Vector<java.lang.Integer> result, java.util.Random random, int max, java.util.Vector<java.lang.Integer> skip, int num_samples)
-
drawWithoutReplacementFisherYates
private void drawWithoutReplacementFisherYates(java.util.Vector<java.lang.Integer> result, java.util.Random random, int max, java.util.Vector<java.lang.Integer> skip, int num_samples)
-
drawWithoutReplacementWeighted
private void drawWithoutReplacementWeighted(java.util.Vector<java.lang.Integer> result, java.util.Random random, java.util.Vector<java.lang.Integer> indices, int num_samples, java.util.Vector<java.lang.Double> weights)
-
drawWithoutReplacementWeighted
private void drawWithoutReplacementWeighted(java.util.Vector<java.lang.Integer> result, java.util.Random random, int max_index, int num_samples, java.util.Vector<java.lang.Double> weights)
-
mostFrequentClass
private int mostFrequentClass(java.util.Vector<java.lang.Integer> class_count, java.util.Random random)Returns the most frequent class index of a vector with counts for the classes. Returns a random class if counts are equal.- Parameters:
class_count- Vector with class countsrandom_number_generator- Random number generator- Returns:
- Most frequent class index. Out of range index if all 0.
-
mostFrequentDClass
private int mostFrequentDClass(java.util.Vector<java.lang.Double> class_count, java.util.Random random)Returns the most frequent class index of a vector with counts for the classes. Returns a random class if counts are equal.- Parameters:
class_count- Vector with class countsrandom_number_generator- Random number generator- Returns:
- Most frequent class index. Out of range index if all 0.
-
mostFrequentValue
private double mostFrequentValue(java.util.HashMap<java.lang.Double,java.lang.Integer> class_count, java.util.Random random)
-
computeConcordanceIndex
private double computeConcordanceIndex(StochasticForests.Data data, java.util.Vector<java.lang.Double> sum_chf, int dependent_varID, int status_varID, java.util.Vector<java.lang.Integer> sample_IDs)
-
uintToString
private java.lang.String uintToString(int number)
-
beautifyTime
private java.lang.String beautifyTime(int seconds)
-
splitString
private void splitString(java.util.Vector<java.lang.String> result, java.lang.String input, java.lang.String split_string)
-
shuffleAndSplit
private void shuffleAndSplit(java.util.Vector<java.lang.Integer> first_part, java.util.Vector<java.lang.Integer> second_part, int n_all, int n_first, java.util.Random random)
-
shuffleAndSplitAppend
private void shuffleAndSplitAppend(java.util.Vector<java.lang.Integer> first_part, java.util.Vector<java.lang.Integer> second_part, int n_all, int n_first, java.util.Vector<java.lang.Integer> mapping, java.util.Random random)
-
checkUnorderedVariables
private java.lang.String checkUnorderedVariables(StochasticForests.Data data, java.util.Vector<java.lang.String> unordered_variable_names)
-
checkPositiveIntegers
private boolean checkPositiveIntegers(java.util.Vector<java.lang.Double> all_values)
-
maxstatPValueLau92
private double maxstatPValueLau92(double b, double minprop, double maxprop)
-
maxstatPValueLau94
private double maxstatPValueLau94(double b, double minprop, double maxprop, int N, java.util.Vector<java.lang.Integer> m)
-
maxstatPValueUnadjusted
private double maxstatPValueUnadjusted(double b)
-
dstdnorm
private double dstdnorm(double x)
-
pstdnorm
private double pstdnorm(double x)
-
erf
private double erf(double x)
-
adjustPvalues
private java.util.Vector<java.lang.Double> adjustPvalues(java.util.Vector<java.lang.Double> unadjusted_pvalues)
-
logrankScores
private java.util.Vector<java.lang.Double> logrankScores(java.util.Vector<java.lang.Double> time, java.util.Vector<java.lang.Double> status)
-
maxstat
private void maxstat(java.util.Vector<java.lang.Double> scores, java.util.Vector<java.lang.Double> x, java.util.Vector<java.lang.Integer> indices, double[] best_maxstat, double[] best_split_value, double minprop, double maxprop)
-
numSamplesLeftOfCutpoint
private java.util.Vector<java.lang.Integer> numSamplesLeftOfCutpoint(java.util.Vector<java.lang.Double> x, java.util.Vector<java.lang.Integer> indices)
-
saveVector1D
private void saveVector1D(java.util.Vector<java.lang.Integer> vector, java.io.BufferedWriter bw)Write a 1d vector to filestream. First the size is written, then all vector elements.- Parameters:
vector- Vector of type T to savefile- ofstream object to write to.
-
saveBVector1D
private void saveBVector1D(java.util.Vector<java.lang.Boolean> vector, java.io.BufferedWriter bw)Write a 1d vector to filestream. First the size is written, then all vector elements.- Parameters:
vector- Vector of type T to savefile- ofstream object to write to.
-
readVector1D
private void readVector1D(java.util.Vector<java.lang.Integer> result, java.io.BufferedReader br)Read a 1d vector written by saveVector1D() from filestream.- Parameters:
result- Result vector with elements of type T.file- ifstream object to read from.
-
readBVector1D
private void readBVector1D(java.util.Vector<java.lang.Boolean> result, java.io.BufferedReader br)Read a 1d vector written by saveVector1D() from filestream.- Parameters:
result- Result vector with elements of type T.file- ifstream object to read from.
-
saveDVector1D
private void saveDVector1D(java.util.Vector<java.lang.Double> vector, java.io.BufferedWriter bw)Write a 1d vector to filestream. First the size is written, then all vector elements.- Parameters:
vector- Vector of type T to savefile- ofstream object to write to.
-
readDVector1D
private void readDVector1D(java.util.Vector<java.lang.Double> result, java.io.BufferedReader br)Read a 1d vector written by saveVector1D() from filestream.- Parameters:
result- Result vector with elements of type T.file- ifstream object to read from.
-
saveVector2D
private void saveVector2D(java.util.Vector<java.util.Vector<java.lang.Integer>> vector, java.io.BufferedWriter bw)Write a 2d vector to filestream. First the size of the first dim is written as size_t, then for all inner vectors the size and elements.- Parameters:
vector- Vector of vectors of type T to write to file.file- ofstream object to write to.
-
readVector2D
private void readVector2D(java.util.Vector<java.util.Vector<java.lang.Integer>> result, java.io.BufferedReader br)Read a 2d vector written by saveVector2D() from filestream.- Parameters:
result- Result vector of vectors with elements of type T.file- ifstream object to read from.
-
saveDVector2D
private void saveDVector2D(java.util.Vector<java.util.Vector<java.lang.Double>> vector, java.io.BufferedWriter bw)Write a 2d vector to filestream. First the size of the first dim is written as size_t, then for all inner vectors the size and elements.- Parameters:
vector- Vector of vectors of type T to write to file.file- ofstream object to write to.
-
readDVector2D
private void readDVector2D(java.util.Vector<java.util.Vector<java.lang.Double>> result, java.io.BufferedReader br)Read a 2d vector written by saveVector2D() from filestream.- Parameters:
result- Result vector of vectors with elements of type T.file- ifstream object to read from.
-
equalVectorInteger
private boolean equalVectorInteger(java.util.Vector<java.lang.Integer> v1, java.util.Vector<java.lang.Integer> v2, java.lang.String str)
-
equalVectorVectorInteger
private boolean equalVectorVectorInteger(java.util.Vector<java.util.Vector<java.lang.Integer>> v1, java.util.Vector<java.util.Vector<java.lang.Integer>> v2, java.lang.String str)
-
equalVectorDouble
private boolean equalVectorDouble(java.util.Vector<java.lang.Double> v1, java.util.Vector<java.lang.Double> v2, java.lang.String str)
-
equalVectorVectorDouble
private boolean equalVectorVectorDouble(java.util.Vector<java.util.Vector<java.lang.Double>> v1, java.util.Vector<java.util.Vector<java.lang.Double>> v2, java.lang.String str)
-
expectNear
private boolean expectNear(double val1, double val2, double error, java.lang.String str)
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBaseActually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithmin classAlgorithmBase
-
-