holoedit.functions
Class ScriptEditorFunctions

java.lang.Object
  extended by holoedit.functions.ScriptEditorFunctions

public final class ScriptEditorFunctions
extends java.lang.Object

This class provides some methods whose names are easily understandable, and that can be used directly in the textArea of the script editor window.


Constructor Summary
private ScriptEditorFunctions()
          ScriptEditorFunctions is non-instantiable.
 
Method Summary
static java.util.Vector<java.util.Vector<java.lang.Double>> getAllDataAtTime(holoedit.data.HoloSDIFdata sdifdata, double time)
          Returns the values corresponding to the given time if the given time is equal to a key of the holoSDIFdata's map.
static int getBeginDate(holoedit.gui.GestionPistes gp)
          Returns the date at which the score selection begins.
static int getDuration(holoedit.gui.GestionPistes gp)
          Returns the length of the score selection.
static int getEndDate(holoedit.gui.GestionPistes gp)
          Returns the date at which the score selection is ending.
static java.util.Vector<java.lang.Double> getFieldAtTime(holoedit.data.HoloSDIFdata sdifdata, double time, int fieldIndex)
          Returns The field corresponding to the given field index at the given time if the given time is equal to a key of the holoSDIFdata's map.
static holoedit.data.HoloSDIFdata getSDIFdata(holoedit.gui.GestionPistes gp, java.lang.String sdifdataDesc)
          Returns the holoSDIFdata that corresponds to the given description sdifdataDesc.
static java.lang.Object[] getTimes(holoedit.data.HoloSDIFdata sdifdata)
          Returns an array of double values corresponding to the frame times of the given sdifdata, and listed in natural order.
static double getTimesCount(holoedit.data.HoloSDIFdata sdifdata)
          Returns the number of time samples that are contained by the given HoloSDIFdata.
static int howManyDataAtTime(holoedit.data.HoloSDIFdata sdifdata, double time)
          Returns the number of values contained by the sdifdata at the given time
static double maxFieldValue(holoedit.data.HoloSDIFdata sdifdata, int fieldIndex)
          Returns the largest value obtained from the sdifdata's field that corresponds to the given fieldIndex.
static double meanFieldValue(holoedit.data.HoloSDIFdata sdifdata, int fieldIndex)
          Returns the mean value obtained from the sdifdata's field that corresponds to the given fieldIndex.
static double minFieldValue(holoedit.data.HoloSDIFdata sdifdata, int fieldIndex)
          Returns the smallest value obtained from the sdifdata for the field corresponding to the given fieldIndex.
static double rangeFieldValue(holoedit.data.HoloSDIFdata sdifdata, int fieldIndex)
          Returns the range (i.e. maxValue-minValue) of the sdifdata's field that corresponds to the given fieldIndex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptEditorFunctions

private ScriptEditorFunctions()
ScriptEditorFunctions is non-instantiable.

Method Detail

getSDIFdata

public static holoedit.data.HoloSDIFdata getSDIFdata(holoedit.gui.GestionPistes gp,
                                                     java.lang.String sdifdataDesc)
Returns the holoSDIFdata that corresponds to the given description sdifdataDesc.

Parameters:
gp - do no pay attention to this parameter, just write "gp" (without quotes!).
sdifdataDesc - the description of an holoSDIFdata located in the score.
Returns:
The holoSDIFdata that corresponds to the given description.

getAllDataAtTime

public static java.util.Vector<java.util.Vector<java.lang.Double>> getAllDataAtTime(holoedit.data.HoloSDIFdata sdifdata,
                                                                                    double time)
Returns the values corresponding to the given time if the given time is equal to a key of the holoSDIFdata's map.
If the given time is not equal to a key, it returns a linear interpolation of the values corresponding to the two closest key.
'null' is returned if the sdifTreeMap is empty or if the time we look for is out of the map keyset range.


getFieldAtTime

public static java.util.Vector<java.lang.Double> getFieldAtTime(holoedit.data.HoloSDIFdata sdifdata,
                                                                double time,
                                                                int fieldIndex)
Returns The field corresponding to the given field index at the given time if the given time is equal to a key of the holoSDIFdata's map.
If the given time is not equal to a key, it returns a linear interpolation of the field values corresponding to the two closest key.
'null' is returned if the sdifTreeMap is empty or if the time we look for is out of the map keyset range.


howManyDataAtTime

public static int howManyDataAtTime(holoedit.data.HoloSDIFdata sdifdata,
                                    double time)
Returns the number of values contained by the sdifdata at the given time


getTimes

public static java.lang.Object[] getTimes(holoedit.data.HoloSDIFdata sdifdata)
Returns an array of double values corresponding to the frame times of the given sdifdata, and listed in natural order.

Returns:
An array containing all the times of the holoSDIFdata, listed in natural order.

getTimesCount

public static double getTimesCount(holoedit.data.HoloSDIFdata sdifdata)
Returns the number of time samples that are contained by the given HoloSDIFdata.

Returns:
The number of time samples contained by the given holoSDIFdata.

minFieldValue

public static double minFieldValue(holoedit.data.HoloSDIFdata sdifdata,
                                   int fieldIndex)
Returns the smallest value obtained from the sdifdata for the field corresponding to the given fieldIndex.


maxFieldValue

public static double maxFieldValue(holoedit.data.HoloSDIFdata sdifdata,
                                   int fieldIndex)
Returns the largest value obtained from the sdifdata's field that corresponds to the given fieldIndex.


meanFieldValue

public static double meanFieldValue(holoedit.data.HoloSDIFdata sdifdata,
                                    int fieldIndex)
Returns the mean value obtained from the sdifdata's field that corresponds to the given fieldIndex.


rangeFieldValue

public static double rangeFieldValue(holoedit.data.HoloSDIFdata sdifdata,
                                     int fieldIndex)
Returns the range (i.e. maxValue-minValue) of the sdifdata's field that corresponds to the given fieldIndex.

Returns:
A double value giving the range of the specified field of the specified holoSDIFdata.

getBeginDate

public static int getBeginDate(holoedit.gui.GestionPistes gp)
Returns the date at which the score selection begins.
Usage in a script :
int dateBegin = getBeginDate(gp);

Parameters:
gp - do no pay attention to this parameter, just write "gp" (without quotes!).
Returns:
The date at which the score selection begins.

getEndDate

public static int getEndDate(holoedit.gui.GestionPistes gp)
Returns the date at which the score selection is ending.
Usage in a script :
int endDate = getEndDate(gp);

Parameters:
gp - do no pay attention to this parameter, just write "gp" (without quotes!).
Returns:
The date at which the score selection is ending.

getDuration

public static int getDuration(holoedit.gui.GestionPistes gp)
Returns the length of the score selection.
Usage in a script :
int dur = getDuration(gp);

Parameters:
gp - do no pay attention to this parameter, just write "gp" (without quotes!).
Returns:
The length of the score selection.