WSTester updated to work plus hopefully all the other changes that need to go into...
[jabaws.git] / binaries / src / ViennaRNA / RNAforester / src / misc.t.cpp
diff --git a/binaries/src/ViennaRNA/RNAforester/src/misc.t.cpp b/binaries/src/ViennaRNA/RNAforester/src/misc.t.cpp
new file mode 100644 (file)
index 0000000..f560d3b
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef _MISC_T_CPP_
+#define _MISC_T_CPP_
+
+// #include <stdio.h>
+
+#include "misc.h"
+
+template <class T>
+void showArray(T *array, Uint m,Uint n)
+{
+//  char buf[20];
+  Uint i,maxElemLen;
+  T maxValue;
+
+  // check for the largest value
+  maxValue=0;
+  for(i=0;i<m*n;i++)
+    maxValue = max(maxValue,array[i]);
+
+  //snprintf(buf,20,"%.02f",maxValue);
+  //maxElemLen=strlen(buf)+1;
+  maxElemLen=5;        
+
+  for(i=0;i<m*n;i++)
+    {
+    if(i%n==0)
+      cout << endl;
+
+    //sprintf(buf,"%*.02f ",maxElemLen,array[i]);
+       cout << "[" << i << "]" << array[i] << " ";
+//    cout << buf;
+    }
+  cout << endl;
+}
+
+
+#endif