|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
corina.index
package contains algorithms for
indexing (de-trending) data.
See:
Description
Interface Summary | |
Solver.Solveable | A basis function for fitting data points to, using least-squares. |
Class Summary | |
CubicSpline | A cubic spline index. |
Exponential | An exponential curve fit. |
Floating | A floating (previously misnamed "floating-point") index; each point on the index is the mean of some number of data points (the window) around that data point. |
HighPass | A simple high-pass filter. |
Horizontal | Horizontal-line index type. |
Index | Abstract representation of an index of a Sample. |
IndexDialog | Indexing dialog. |
IndexDialog.DecimalRenderer | |
IndexDialog2 | |
IndexSet | Run a set of Indexes on a single Sample. |
Polynomial | A polynomial-fit index to a data sample. |
Solver | A collection of matrix solvers. |
Exception Summary | |
Solver.SingularMatrixException | In case an operation is passed a singular matrix. |
The corina.index
package contains algorithms for
indexing (de-trending) data. They are easily runnable as Threads
(they implement Runnable), but most samples are probably too short and
most computers too fast for this to be really necessary. They also
are Graphable, so the user can visually compare indexes.
A single Index is straightforward to use:
Index i = new Floating(mySample); // create the index System.out.println("Running index:" + i); // print the name i.run(); // run the computation System.out.println("chi^2 = " + i.getChi2()); // print chi^2 value i.apply(); // apply to mySampleBecause Indexes are Graphable, an application will usually give the user the option to view the graph after running it, but before applying it.
Since they're Runnable, you can also run it in a separate thread:
Thread t = new Thread(new Exponential(mySample)); t.start();But this probably isn't necessary, unless you're on a slow computer or want the interface to be highly responsive.
Usually, the user will want to see many different possible indexes, and choose one. For this, IndexSet is provided. It will run a group of common indexes. The application can then display them all (in a table, for example):
IndexSet is = new IndexSet(mySample); // create an IndexSet is.run(); // IndexSet is also Runnable for (int i=0; i<is.indexes.size(); i++) { // print each, along with chi^2 Index x = (Index) is.indexes.get(i); System.out.println(x + ", chi^2 = " + x.getChi2()); }
getName()
. One version is already provided: it
returns the name of the class. If this isn't good enough for
you (the Polynomial index does some nice formatting of its
name), overload this method with whatever you like. It should
return the type of cross, but not include the name of the sample
being indexed.run()
. Again, whatever you want, but it has to
fill the data field with the proper number of elements.To use it, you'll probably want to add it to IndexSet.
Be sure to write Javadoc for the Index, including what the algorithm is and where it came from, and update the IndexSet Javadoc, if you add it there.
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |