public class NumericInputProbe extends NumericProbeBase implements CopyableComponent
Probe.ExportProps, Probe.ImportExportFileInfoModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibility| Modifier and Type | Field and Description | 
|---|---|
static PropertyList | 
myProps  | 
EXPLICIT_TIME, mySmallDisplayuseOldSaveMethod, writeStartStopTimeInSecondsenforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNamesCOPY_REFERENCES, REST_POSITION| Constructor and Description | 
|---|
NumericInputProbe()  | 
NumericInputProbe(ModelComponent e)  | 
NumericInputProbe(ModelComponent e,
                 java.lang.String[] propNames,
                 double startTime,
                 double stopTime)  | 
NumericInputProbe(ModelComponent e,
                 java.lang.String[] propNames,
                 java.lang.String fileName)  | 
NumericInputProbe(ModelComponent e,
                 java.lang.String propName,
                 double startTime,
                 double stopTime)  | 
NumericInputProbe(ModelComponent e,
                 java.lang.String propName,
                 java.lang.String fileName)  | 
NumericInputProbe(Property[] props,
                 ModelComponent e)  | 
NumericInputProbe(Property prop,
                 ModelComponent e)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addData(double[] data,
       double timeStep)
Adds one or more data points to this probe's numeric data. 
 | 
void | 
addData(double t,
       double[] v)  | 
void | 
addData(double t,
       Matrix M)  | 
void | 
addData(double t,
       Vector v)
Adds data to internal data list. 
 | 
NumericListKnot | 
addData(double t,
       VectorNd v)
Adds data to internal data list. 
 | 
void | 
addData(java.io.File file,
       double timeStep)  | 
void | 
apply(double t)
Interpolate data to specified time and set related properties values. 
 | 
java.lang.Object | 
clone()  | 
ModelComponent | 
copy(int flags,
    java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component. 
 | 
ComponentState | 
createState(ComponentState prevState)
Factory routine to create a state object for this component, which can
 then be used as an argument for  
HasState.setState(artisynth.core.modelbase.ComponentState) and HasState.getState(artisynth.core.modelbase.ComponentState). | 
PropertyList | 
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
 this object. 
 | 
boolean | 
getCopyReferences(java.util.List<ModelComponent> refs,
                 ModelComponent ancestor)
Collects external references which must also be copied in order to
 duplicate this component. 
 | 
boolean | 
getExtendData()
Returns true if data is to be extended past the last knot point 
 | 
NumericList | 
getInput()  | 
void | 
getState(ComponentState state)
Get the current state of this component. 
 | 
boolean | 
hasState()
Queries if this component has state. 
 | 
boolean | 
isDuplicatable()
Returns true if this component can be duplicated. 
 | 
boolean | 
isEditable()
Returns  
true if this probe can be edited using the ProbeEditor
 widget. | 
boolean | 
isInput()
Returns true if this probe is an input probe, and false otherwise. 
 | 
boolean | 
isSettable()  | 
void | 
load()
When called (perhaps by the Artsynth timeline), causes information about
 this probe to be loaded from the attached file. 
 | 
void | 
loadEmpty()  | 
void | 
postscan(java.util.Deque<ScanToken> tokens,
        CompositeComponent ancestor)
Performs any required post-scanning for this component. 
 | 
void | 
save()
When called (perhaps by the Artsynth timeline), causes information about
 this probe to be written to the attached file. 
 | 
void | 
scan(ReaderTokenizer rtok,
    java.lang.Object ref)
Scans this element from a ReaderTokenizer. 
 | 
boolean | 
scanItem(ReaderTokenizer rtok,
        java.util.Deque<ScanToken> tokens)  | 
void | 
set(Property[] props,
   java.lang.String[] driverExpressions,
   java.lang.String[] variableNames,
   int[] variableDimensions)  | 
void | 
set(Property[] props,
   java.lang.String[] driverExpressions,
   java.lang.String[] variableNames,
   int[] variableDimensions,
   PlotTraceInfo[] traceInfos)  | 
void | 
setAttachedFileName(java.lang.String fileName)  | 
void | 
setAttachedFileName(java.lang.String fileName,
                   java.lang.String fmtStr)  | 
void | 
setData(double sec)  | 
void | 
setData(double[] data,
       double timeStep)
Sets the data points in this probe's numeric data. 
 | 
void | 
setExtendData(boolean extend)
Enables extension of data past the last knot point. 
 | 
void | 
setInputProperties(Property[] props)  | 
void | 
setState(ComponentState state)
Set the state of this component. 
 | 
void | 
write(java.io.PrintWriter pw,
     java.lang.String fmtStr)
Writes the start and stop times, scale value, and data for this probe to a
 PrintWriter, using the format described for  
read(File). | 
void | 
writeItems(java.io.PrintWriter pw,
          NumberFormat fmt,
          CompositeComponent ancestor)
Write probe attributes to a PrintWriter 
 | 
addData, applyDefaultDisplayRanges, clearData, decreaseDisplayRanges, dispose, exportCsvData, exportCsvData, exportData, exportTextData, exportTextData, getAttachedProperties, getData, getData, getDefaultDisplayMax, getDefaultDisplayMin, getDefaultDisplayRange, getDisplay, getDrivers, getExportFileInfo, getExportProps, getFormat, getImportFileInfo, getInterpolation, getInterpolationOrder, getLegend, getMatlabName, getMinMaxValues, getNumericList, getOrderedTraceIndex, getPlotTraceInfo, getRotationRep, getRotationSubvecOffsets, getTraceColor, getTraceLabel, getTraceManager, getValues, getVariables, getVisibleMinMaxValues, getVisibleRange, getVisibleRange, getVsize, importCsvData, importData, importText, importTextData, increaseDisplayRanges, isCloneable, isDisplayable, isEmpty, isPrintable, isSmallDisplayVisible, isTraceVisible, isValidVariableName, isWritable, loadFromMatlab, print, read, removeDisplay, removeLegend, resetTraceColors, resetTraceOrder, saveToMatlab, scaleNumericList, setData, setData, setDefaultDisplayRange, setDefaultDisplayRange, setFormat, setInterpolation, setInterpolationOrder, setLegend, setLegendLabels, setScale, setSmallDisplayVisible, setTraceColor, setTraceLabel, setTraceOrder, setTraceVisible, setValues, setValues, smoothWithMovingAverage, smoothWithSavitzkyGolay, swapPlotTraceOrder, updateDisplays, updateDisplays, updateDisplaysForPropertyChanges, updateDisplaysWithoutAutoRanging, writeTextgetAttachedFile, getAttachedFileName, getChildren, getClippedVirtualTime, getDefaultScale, getDefaultStartTime, getDefaultStopTime, getDefaultUpdateInterval, getDuration, getExportFile, getExportFileName, getFileFromPath, getImportFile, getImportFileName, getInitialState, getPathFromFile, getProperty, getScale, getStartTime, getStopTime, getTimelineTime, getTrack, getUpdateInterval, getVirtualTime, hasAttachedFile, hasChildren, isAttachedFileRelative, isEventTime, isScalable, nextEventTime, setExportFileName, setImportFileName, setInterval, setName, setScalable, setStartStopTimes, setStartTime, setStopTime, setTrack, setUpdateIntervalfinalize, getModel, initialize, isActive, setActive, setModel, setModelFromComponent, writecheckFlag, checkName, checkNameUniqueness, clearFlag, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isScanning, isSelected, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferencesequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferencesgetPropertygetChildren, hasChildrenisWritable, writepublic static PropertyList myProps
public NumericInputProbe()
public NumericInputProbe(ModelComponent e)
public NumericInputProbe(ModelComponent e, java.lang.String propName, java.lang.String fileName) throws java.io.IOException
java.io.IOExceptionpublic NumericInputProbe(ModelComponent e, java.lang.String[] propNames, java.lang.String fileName) throws java.io.IOException
java.io.IOExceptionpublic NumericInputProbe(ModelComponent e, java.lang.String propName, double startTime, double stopTime)
public NumericInputProbe(ModelComponent e, java.lang.String[] propNames, double startTime, double stopTime)
public NumericInputProbe(Property prop, ModelComponent e)
public NumericInputProbe(Property[] props, ModelComponent e)
public PropertyList getAllPropertyInfo()
HasPropertiesgetAllPropertyInfo in interface HasPropertiesgetAllPropertyInfo in class NumericProbeBasepublic void setInputProperties(Property[] props)
public void setExtendData(boolean extend)
extend - true if data is to be extended past the last knot pointpublic boolean getExtendData()
public void write(java.io.PrintWriter pw,
                  java.lang.String fmtStr)
           throws java.io.IOException
read(File). The format used for producing floating point numbers can be
 controlled using a printf-style format string, details of which are
 described in NumberFormat.pw - writer which accepts the outputfmtStr - printf-style format string (if set to null then "%g" will be assumed,
 which will produce full precision output).java.io.IOException - if an I/O error occurs.public void setAttachedFileName(java.lang.String fileName)
setAttachedFileName in class Probepublic void setAttachedFileName(java.lang.String fileName,
                                java.lang.String fmtStr)
public void save()
          throws java.io.IOException
save in class Probejava.io.IOExceptionwrite(java.io.PrintWriter, java.lang.String)public void loadEmpty()
public void load()
          throws java.io.IOException
public void addData(java.io.File file,
                    double timeStep)
             throws java.io.IOException
java.io.IOExceptionpublic void setData(double[] data,
                    double timeStep)
The times for the data points can be evenly distributed, starting at 0
 with a time step specified by timeStep, or their times can be
 explicitly set; for the latter case, timeStep must be set to
 NumericProbeBase.EXPLICIT_TIME.
 
Each data point is specified by a contiguous set of M values in data, where M is the probe data vector size as returned by NumericProbeBase.getVsize(). If the point times are explicitly specified, then these
 values must be preceeded by the point's time. The number of data points N
 is inferred from the length of data, which will be N*(1+M) if
 point times are explicity specified, and N*M otherwise.
data - contains the data values for all the points.timeStep - time step in seconds, or NumericProbeBase.EXPLICIT_TIME if data contains
 the point timespublic void addData(double[] data,
                    double timeStep)
The times for the data points can be evenly distributed, starting at 0
 with a time step specified by timeStep, or their times can be
 explicitly set; for the latter case, timeStep must be set to
 NumericProbeBase.EXPLICIT_TIME.
 
Each data point is specified by a contiguous set of M values in data, where M is the probe data vector size as returned by NumericProbeBase.getVsize(). If the point times are explicitly specified, then these
 values must be preceeded by the point's time. The number of data points N
 is inferred from the length of data, which will be N*(1+M) if
 point times are explicity specified, and N*M otherwise.
data - contains the data values for all the points.timeStep - time step in seconds, or NumericProbeBase.EXPLICIT_TIME if data contains
 the point timespublic NumericListKnot addData(double t, VectorNd v)
t - time in secondsv - vector of valuesjava.lang.IllegalArgumentException - if size of vector is not equal to NumericProbeBase.getVsize()public void addData(double t,
                    double[] v)
public void addData(double t,
                    Vector v)
t - time in secondsv - vector of valuesjava.lang.IllegalArgumentException - if size of vector is not equal to NumericProbeBase.getVsize()public void addData(double t,
                    Matrix M)
public void apply(double t)
apply in class NumericProbeBaset - current timepublic boolean hasState()
ModelComponenthasState in interface ModelComponenthasState in class Probetrue if this component has statepublic ComponentState createState(ComponentState prevState)
HasStateHasState.setState(artisynth.core.modelbase.ComponentState) and HasState.getState(artisynth.core.modelbase.ComponentState). The state object does not have to be set to the component's
 current state.  If the component does not have any state information,
 this method should return an instance of
 EmptyState.createState in interface HasStatecreateState in class ProbeprevState - If non-null, supplies a previous state that
 was created by this component and which can be used to provide
 pre-sizing hints.public void getState(ComponentState state)
HasStatepublic void setState(ComponentState state)
HasStatepublic boolean isSettable()
isSettable in class Probepublic boolean isEditable()
true if this probe can be edited using the ProbeEditor
 widget.isEditable in class Probetrue if this probe can be editedpublic java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
clone in class NumericProbeBasejava.lang.CloneNotSupportedExceptionpublic NumericList getInput()
public boolean scanItem(ReaderTokenizer rtok, java.util.Deque<ScanToken> tokens) throws java.io.IOException
java.io.IOExceptionpublic void scan(ReaderTokenizer rtok, java.lang.Object ref) throws java.io.IOException
ModelComponentBasewrite.scan in interface ModelComponentscan in interface Scannablescan in class Probertok - Tokenizer from which to scan the elementref - optional reference object which can be used for resolving references to
 other objectsjava.io.IOException - if an I/O or formatting error occuredpublic void postscan(java.util.Deque<ScanToken> tokens, CompositeComponent ancestor) throws java.io.IOException
PostScannablescan() method and stored in the token queue.
 The most common use of this method is to resolve the paths
 of component references, which may not have been created
 at the time of the initial scan() call.postscan in interface PostScannablepostscan in class ModelComponentBasetokens - token information that was stored during 
 scan().ancestor - ancestor component with respect to which
 reference component paths are defined.java.io.IOException - if an error is encountered (such as a reference to a
 non-existent component)public void writeItems(java.io.PrintWriter pw,
                       NumberFormat fmt,
                       CompositeComponent ancestor)
                throws java.io.IOException
Probepw - writer to which components are writtenfmt - format for floating point numbersancestor - ancestor component which respect to which references are
 expressedjava.io.IOException - if an I/O error occurredpublic boolean isInput()
Probepublic void set(Property[] props, java.lang.String[] driverExpressions, java.lang.String[] variableNames, int[] variableDimensions)
public void set(Property[] props, java.lang.String[] driverExpressions, java.lang.String[] variableNames, int[] variableDimensions, PlotTraceInfo[] traceInfos)
public boolean isDuplicatable()
true if and only if CopyableComponent.getCopyReferences(java.util.List<artisynth.core.modelbase.ModelComponent>, artisynth.core.modelbase.ModelComponent) returns true.
 This method is not currently used. It is intended to provide a faster
 way of determining if a component can be duplicated, without having to
 use CopyableComponent.getCopyReferences(java.util.List<artisynth.core.modelbase.ModelComponent>, artisynth.core.modelbase.ModelComponent) to build the list of copy references.
isDuplicatable in interface CopyableComponenttrue if this component can be duplicated.public boolean getCopyReferences(java.util.List<ModelComponent> refs, ModelComponent ancestor)
true if and only if CopyableComponent.isDuplicatable() returns
 true.getCopyReferences in interface CopyableComponentrefs - list to which references are appendedancestor - root node of the hierarchy from which references are to be excludedpublic ModelComponent copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponentCOPY_REFERENCES
 is set in flags, then any component referenced
 by this component should itself be set to a copy. This
 should be done first checking copyMap for an 
 existing copy of the referenced component. If there is no existing
 copy, then a copy should be created by calling copy
 recursively and adding the new copy to copyMap.copy in interface CopyableComponentcopy in class ModelComponentBaseflags - flags to control the copyingcopyMap - map to possible existing instances of referenced
 components