artisynth.core.mechmodels
Class ExcitationUtils
java.lang.Object
artisynth.core.mechmodels.ExcitationUtils
public class ExcitationUtils
- extends java.lang.Object
Support routines for Muscle excitations.
Method Summary |
static void |
addAncestorAsSource(ExcitationComponent ecomp,
int height)
Look for the first ancestor of an ExcitationComponent, up to
a prescribed height, that happens to also be an ExcitationComponent. |
static double |
combine(double e,
ExcitationSourceList sources,
ExcitationComponent.CombinationRule rule)
|
static double |
combineWithAncestor(ExcitationComponent ecomp,
ExcitationSourceList sources,
int height,
ExcitationComponent.CombinationRule rule)
|
static double |
getAncestorNetExcitation(ModelComponent comp,
int height)
|
static double |
getGain(ExcitationSourceList sources,
ExcitationComponent ex)
|
static java.util.ArrayList<ExcitationComponent> |
postscanSources(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor)
|
static void |
removeAncestorAsSource(ExcitationComponent ecomp,
int height)
Look for the first ancestor of an ExcitationComponent, up to
a prescribed height, that happens to also be an ExcitationComponent. |
static ExcitationSourceList |
scan(ReaderTokenizer rtok,
java.lang.String name,
java.util.Deque<ScanToken> tokens)
|
static boolean |
setGain(ExcitationSourceList sources,
ExcitationComponent ex,
double gain)
|
static ExcitationSourceList |
updateReferences(ModelComponent host,
ExcitationSourceList sources,
boolean undo,
java.util.Deque<java.lang.Object> undoInfo)
|
static void |
writeSources(java.io.PrintWriter pw,
java.lang.String name,
java.util.Collection<ExcitationComponent> sources,
CompositeComponent ancestor)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExcitationUtils
public ExcitationUtils()
getAncestorNetExcitation
public static double getAncestorNetExcitation(ModelComponent comp,
int height)
combineWithAncestor
public static double combineWithAncestor(ExcitationComponent ecomp,
ExcitationSourceList sources,
int height,
ExcitationComponent.CombinationRule rule)
combine
public static double combine(double e,
ExcitationSourceList sources,
ExcitationComponent.CombinationRule rule)
addAncestorAsSource
public static void addAncestorAsSource(ExcitationComponent ecomp,
int height)
- Look for the first ancestor of an ExcitationComponent, up to
a prescribed height, that happens to also be an ExcitationComponent.
If one is found, add it to the component as a source.
- Parameters:
ecomp
- Component for which ancestors should be checkedheight
- Maximum ancestor height (1 = parent, 2 = grandparent, etc.)
removeAncestorAsSource
public static void removeAncestorAsSource(ExcitationComponent ecomp,
int height)
- Look for the first ancestor of an ExcitationComponent, up to
a prescribed height, that happens to also be an ExcitationComponent.
If one is found, remove it from the component as a source.
- Parameters:
ecomp
- Component for which ancestors should be checkedheight
- Maximum ancestor height (1 = parent, 2 = grandparent, etc.)
writeSources
public static void writeSources(java.io.PrintWriter pw,
java.lang.String name,
java.util.Collection<ExcitationComponent> sources,
CompositeComponent ancestor)
throws java.io.IOException
- Throws:
java.io.IOException
postscanSources
public static java.util.ArrayList<ExcitationComponent> postscanSources(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor)
throws java.io.IOException
- Throws:
java.io.IOException
getGain
public static double getGain(ExcitationSourceList sources,
ExcitationComponent ex)
setGain
public static boolean setGain(ExcitationSourceList sources,
ExcitationComponent ex,
double gain)
scan
public static ExcitationSourceList scan(ReaderTokenizer rtok,
java.lang.String name,
java.util.Deque<ScanToken> tokens)
throws java.io.IOException
- Throws:
java.io.IOException
updateReferences
public static ExcitationSourceList updateReferences(ModelComponent host,
ExcitationSourceList sources,
boolean undo,
java.util.Deque<java.lang.Object> undoInfo)