|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.CommandLineParser
util.ColumnCalculator
public class ColumnCalculator
This class acts like a column reader and re-formatter, but allows also
some calculations to be done with the columns. The "-col" switch defines
the columns to read, they are addressable via n variable names
t1, t2, t3,...,tn.
If an expression via "-calc" is given, it must follow the format
t1*t2,t3-t1,...,exp_mresulting in m new columns. If number
formats are given with -nf, their number must match the number of
expressions rather than columns read. If -o is given, the data is writtn
to that file, otherwise they are dumped to standard out.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.CommandLineParser |
|---|
CommandLineParser.Test |
| Field Summary | |
|---|---|
private static String |
FOOT
The footer message. |
private static String |
ONESWITCHES
The switches. |
private static Map<String,String> |
USE
The usage map. |
| Constructor Summary | |
|---|---|
ColumnCalculator()
Constructs a new column calculator. |
|
| Method Summary | |
|---|---|
private static Double |
evaluate(String expression,
Map<String,Double> vars)
Evaluates a single expression giving the variables as name value pairs in the map. |
static void |
main(String[] arg)
Entry point. |
boolean |
process(String[] arg)
Processes the command line arguments. |
VectorG |
v841CenR(Map<String,Double> tdv)
The fit for V841Cen, sIRAIT campaign in July, 2007, Dome-C. |
VectorG |
v841CenV(Map<String,Double> tdv)
The fit for V841Cen, sIRAIT campaign in July, 2007, Dome-C. |
| Methods inherited from class util.CommandLineParser |
|---|
getArguments, getCommandLine, getCommands, getRegisteredSwitches, hasAnySwitch, hasSwitch, hasSwitch, haveAllSwitches, parse, printCommandLine, registerLine, registerSwitches, setCommands, staticUsage, usage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final String ONESWITCHES
private static final Map<String,String> USE
private static final String FOOT
| Constructor Detail |
|---|
public ColumnCalculator()
| Method Detail |
|---|
public boolean process(String[] arg)
throws ParseException,
IOException
ParseException
IOException
private static Double evaluate(String expression,
Map<String,Double> vars)
throws ParseException
ParseExceptionpublic VectorG v841CenV(Map<String,Double> tdv)
yF=Σn=1,3A_n*cos(2π*n*f*x)+B_n*sin(2π*n*f*x)
public VectorG v841CenR(Map<String,Double> tdv)
yF=Σn=1,3A_n*cos(2π*n*f*x)+B_n*sin(2π*n*f*x)
public static void main(String[] arg)
throws ParseException,
IOException
ParseException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||