|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlacam.utils.Toolkit
This is the toolbox of the lacam system containing all the things that might be usefull to all classes in the system as well as plugins using the system.
Constructor Summary | |
Toolkit()
|
Method Summary | |
static dbis.util.graphic.objects.graphs.GraphNode |
createTaskNode(TaskDescriptor descriptor,
int x,
int y,
boolean save_to_config,
java.lang.String identifier)
Creates a GraphNode with an attached TaskNodeListener which can be attached to the desktop.
|
static double[] |
gauss(double[][] A,
double[] b)
Gaussion algorithm to solve linear equations (Ax = b). |
static int |
gcd(int n,
int d)
Determines the greatest common divisor of two numbers. |
static java.lang.String |
getAttributeValue(org.w3c.dom.Node node,
java.lang.String attribute_name)
|
static int[] |
getCenterCoordinates(int width,
int height)
|
static byte[] |
getObjectFromFile(java.lang.String name,
java.io.File plugin)
Loads the desired file from a file, which may be a folder or a zip archive |
static double |
getRSquare(double[] rowData,
int norder)
|
static int |
hasNamedParameter(org.w3c.dom.NodeList parameterlist,
java.lang.String name)
|
static boolean |
isPrime(long x)
Determines if a number is a prime using the sieve of Eratosthenes |
static java.lang.String |
makeStatement(java.lang.String pattern,
java.lang.Object[] args)
Just replaces the {..} in the pattern with the value given in args |
static double[] |
normalize_eucl(double[] vector)
Normalizes the given vector according to the Euclidian norm |
static double[] |
normalize_one(double[] vector)
Normalizes the given vector according to the One-norm |
static double[] |
ols_regression(double[][] rawData,
int norder)
Calculates OLS Regression on a given dataset. |
static double[] |
ols_regression(double[] data,
int norder)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Toolkit()
Method Detail |
public static byte[] getObjectFromFile(java.lang.String name, java.io.File plugin)
name
- name/path of the object to loadplugin
- the plugin file
public static java.lang.String makeStatement(java.lang.String pattern, java.lang.Object[] args)
pattern
- The pattern to useargs
- The values to use
MessageFormat
public static java.lang.String getAttributeValue(org.w3c.dom.Node node, java.lang.String attribute_name)
public static int hasNamedParameter(org.w3c.dom.NodeList parameterlist, java.lang.String name)
parameterlist
- The parameterlist of the descriptor ndoename
- The name of the parameter
public static int[] getCenterCoordinates(int width, int height)
public static double[] ols_regression(double[] data, int norder)
public static double[] ols_regression(double[][] rawData, int norder)
rawData
- The array containing the points to use for regression. The format is rawData[i][0] = y, rawData[i][1] = xnorder
- The dimension of the ols_regressiongauss(double[][], double[])
public static double getRSquare(double[] rowData, int norder)
public static double[] gauss(double[][] A, double[] b)
A
- The A of the equationb
- The b of the equation
public static double[] normalize_eucl(double[] vector)
vector
- The vector to normalize
public static double[] normalize_one(double[] vector)
vector
- The vector to normlalize
public static boolean isPrime(long x)
x
- any number to test.
public static int gcd(int n, int d)
n
- number 1d
- number 2
public static dbis.util.graphic.objects.graphs.GraphNode createTaskNode(TaskDescriptor descriptor, int x, int y, boolean save_to_config, java.lang.String identifier)
GraphNode
with an attached TaskNodeListener
which can be attached to the desktop.
This GraphNode can be appended to any GraphicsContainer
.
descriptor
- The TaskDescriptor
of the Task to start on click-Eventx
- The x-Position of the nodey
- The y-Position of the nodesave_to_config
- True if the Node should be appended to Config (make node persistent if node not persistent yet)identifier
- The identifier of the Node (Ust a Timestamp here)MainGUIForm.updateDesktopItems()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |