A vector containing DTWTemplateListItem
objects. Data can be added by using Vector.add( Object o )
-method. Removing data is done using Vector.remove(Object o)
-method. Templates Vector
is used to contain DTWTemplateListItem
items for storing template locations in DLL data structures and template names.
DTWDataVector Observation
An object containing the current observation.
DTWParameters Parameters
An object containing parameters for DTW algorithm.
DTWOneResult[] Results
Algorithm run results.
int[][] WarpingPath
Warping path.
DTWDLLApi DLLApi
DLLApi object.
Implementation of methods
getTemplates
DTWDataVector
objects of size Templates.size()
. If Templates.size()
is zero, return a null reference.
DTWDLLApi.getTemplate(int tIndex)
.
DTWDataVector
array.
DTWDataVector
array.
getTemplateList
DTWTemplateListItems
of size Templates.size()
.
Templates Vector
elements to the new array.
DTWTemplateListItems
.
addTemplates
Loop following actions for newTemplates.length()
times. Variable i is the looping counter.
DTWTemplateListItem
object.
DTWTemplateListItem
to newTemplates[i].getName()
.
DTWDLLApi.addTemplate
method with parameter newTemplates[i].getValues()
.
tIndex
for the new DTWTemplateListItem
to the return value of DTWDLLApi.addTemplates
method.
DTWTemplateListItem
to Templates Vector
.
getTemplateName
Templates Vector
for a template with index tIndex
.
DTWTemplateListItem
.
DLLApi
method delTemplate
with parameter tIndex.
Templates Vector
for a template with tIndex
value matching tIndex
.
Templates.remove()
method for the template matching with tIndex
.
deleteAllTemplates
Repeat the following action for all the templates in Templates Vector
.
Templates
and call DLLApi
method delTemplate(i)
.
Templates.removeAllElements()
method.
getObservation
Observation
object.
setObservation
Observation
to newObservation
received as a parameter.
getObservationName
Observation.getName()
.
newParameters
to Parameters
.
getDTWParameters
StringBuffer
object.
StringBuffer
object ``DTW Algorithm parameters.''
StringBuffer
object ``Euclidian Metrics'' and endline, if Parameters.dmetrics = EuclidianDistanceMetrics.
StringBuffer
object ``Derivative Metrics'' and endline, if Parameters.dmetrics = DerivativeDistanceMetrics.
StringBuffer
object ``Warping window width: `` and Parameters.wwidth and endline.
StringBuffer
object ``Sconstraint: `` and Parameters.sconstraint and endline
StringBuffer
object ``Fixed start and end points'' and endline if Parameters.seoffset = 0.
StringBuffer
object ``Allowable start and end point offset: `` and Parameters.seoffset and endline if Parameters.seoffset > 0.
StringBuffer
converted to String.
getWindowWidth
DLLApi
method CompareAll
with parameters Observation.values
, Parameters
.
Templates.size()
.
Results
.
DTWCompareOne
method with best matching template.
DLLApi
method CompareOne
with parameters Observation.values
, Parameters
, tIndex
.
Results
and WarpingPath
.
getResults
Results
array.
getWarpingPath
WarpingPath
.