next up previous contents
Next: Internal data structures of Up: Detailed information Previous: Internal data structures for   Contents

Method implementation of the DTWDLLApi module

DTWDLLApi.addTemplate

  1. Call method DTWWRAP.addTemplate with argument vec which is an array of single-precision floating point numbers.

  2. Return the index number returned from the DTWWRAP module to the caller.

DTWDLLApi.getTemplate

  1. Call method DTWWRAP.getTemplate with argument tIndex which is an integer number that specifies a single template in the DLL.

  2. Return the array of single-precision floating point numbers returned by DTWWRAP.getTemplate to the caller.

DTWDLLApi.delTemplate

  1. Call method DTWWRAP.delTemplate with argument tIndex which is an integer number that specifies a single template in the DLL.
  2. Return either true or false to the caller, depending on the result from the operation.

DTWDLLApi.CompareAll

  1. Create an integer array DTWparams[] of length four
  2. Move algorithm parameters from the DTWParameters object received as a parameter to DTWparams[].
  3. Call method DTWWRAP.CompareAll with arguments oSeq and DTWparams[].
  4. If DTWWRAP.CompareAll returned true,
    1. create an array all_res_elements for storing DTWAllResultsElement objects
    2. call method DTWWRAP.getResult_sortedIndex and store the returned integer array into res_array.
    3. Iterate through the elements in res_array, calling DTWWRAP.getResult_dtwDistance for each element and create an instance of DTWAllResultsElement with the returned value and the index number. Add the new DTWAllResultsElement to all_res_elements.
    4. Return the finished all_res_elements array to the caller.
  5. If DTWWRAP.CompareAll returned false, return null to the caller.

DTWDLLApi.CompareOne

  1. Create an integer array DTWparams[] of length four
  2. Move algorithm parameters from the DTWParameters object received as a parameter to DTWparams[].
  3. Call method DTWWRAP.CompareOne with arguments tIndex, oSeq and DTWparams[].
  4. If DTWWRAP.CompareOne returned true,
    1. call DTWWRAP.getResult_PathX and store the returned integer array into res_arr_pathx.
    2. call DTWWRAP.getResult_PathY and store the returned integer array into res_arr_pathy.
    3. create an array res_arr_pathxy, length of two.
    4. store res_arr_pathx and res_arr_pathy in res_arr_pathxy.
    5. call DTWWRAP.getResult_dtwDistance and store the returned floating point number into res_dtwDistance.
    6. create an DTWOneResult object with values stored in res_arr_pathxy and res_dtwDistance.
    7. return the created DTWOneResult object to the caller.
  5. If DTWWRAP.CompareOne returned false, return null to the caller.


next up previous contents
Next: Internal data structures of Up: Detailed information Previous: Internal data structures for   Contents
2002-03-19