next up previous contents
Next: Graphical User Interface Up: Detailed information Previous: Internal data structures of   Contents

Method implementation of the DTWWRAP module

DTWWRAP.addTemplate

  1. Transform the tSeq[] array received as a parameter into an array t_Seq[] understandable by C++.
  2. Call function addTemplate from the loaded library DTWLIB.DLL, with parameters tSeq[] and nSeq, an integer number telling the length of tSeq.
  3. Return the integer number returned by the called function to the caller.

DTWWRAP.delTemplate

  1. Call function DTDelTemplate from the loaded library DTWLIB.DLL, with parameter tIndex, an integer number representing a single template in the DLL.
  2. Return a boolean value depending on the result.

DTWWRAP.getTemplate

  1. Create a Java array ret_array for floating point numbers.
  2. Call DTGetTemplate from the loaded library DTWLIB.DLL, with parameter tIndex, an integer number representing a single template in the DLL.
  3. Store the values stored in the float[] type array returned by the function in ret_array.
  4. Return ret_array to the caller.

DTWWRAP.CompareAll

  1. Transform the floating point number array received as a parameter into an array o_Seq[] understandable by C++.
  2. Construct a DTWParameters structure dtwparams from the values given in the parameter array params.
  3. Store the length of o_Seq in an integer variable o_Seq_len.
  4. Introduce an integer pointer numresults and set the pointed memory address to zero.
  5. Call DTCompareAll from the loaded library DTWLIB.DLL, with parameters o_Seq[], dtwparams, o_Seq_len and numresults.
  6. If DTCompareAll returned anything except NULL,
    1. empty the array dtw_all_results_array for DTWAllResultsElement structures.
    2. store the returned DTWAllResultsElement array in dtw_all_results_array.
    3. return true to the caller.
  7. Else, return false to the caller.

DTWWRAP.CompareOne

  1. Transform the floating point number array received as a parameter into an array o_Seq[] understandable by C++.
  2. Construct a DTWParameters structure dtwparams from the values given in the parameter array params.
  3. Store the length of o_Seq in an integer variable o_Seq_len.
  4. Call DTCompareAll from the loaded library DTWLIB.DLL, with parameters o_Seq[], dtwparams, o_Seq_len and tIndex.
  5. If DTCompareAll returned anything except NULL,
    1. empty the structure dtw_one_result.
    2. store the returned DTWOneResult structure in dtw_one_result.
    3. return true to the caller.
  6. Else, return false to the caller.

DTWWRAP.getResult_sortedIndex

  1. Create a Java array, sorted_index, of integer numbers, length of dtw_all_results_array_len.
  2. Iterate through dtw_all_results_array and store DTWAllResultsElement.tIndex values into sorted_index.
  3. Return sorted_index to the caller.

DTWWRAP.getResult_PathX

  1. Create a Java array, pathx, of integer numbers, length of dtw_one_result.pathLen.
  2. Iterate through dtw_one_result.warpingPath[0] and store the values into pathx.
  3. Return pathx to the caller.

DTWWRAP.getResult_PathY

  1. Create a Java array, pathy, of integer numbers, length of dtw_one_result.pathLen.
  2. Iterate through dtw_one_result.warpingPath[1] and store the values into pathy.
  3. Return pathy to the caller.

DTWWRAP.getResult_dtwDistance

  1. Create a jfloat variable jf_dtw_distance.
  2. Store the member DTWAllResultsElement.dtwDistance from the structure pointed by given parameter tIndex to jf_dtw_distance.
  3. Return jf_dtw_distance to the caller.


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