[cig-commits] r8943 - cs/benchmark/cigma/trunk/src/tests
luis at geodynamics.org
luis at geodynamics.org
Wed Dec 19 12:06:18 PST 2007
Author: luis
Date: 2007-12-19 12:06:18 -0800 (Wed, 19 Dec 2007)
New Revision: 8943
Added:
cs/benchmark/cigma/trunk/src/tests/TestPoints.cpp
Log:
Quick test for Points class
Added: cs/benchmark/cigma/trunk/src/tests/TestPoints.cpp
===================================================================
--- cs/benchmark/cigma/trunk/src/tests/TestPoints.cpp 2007-12-19 20:06:07 UTC (rev 8942)
+++ cs/benchmark/cigma/trunk/src/tests/TestPoints.cpp 2007-12-19 20:06:18 UTC (rev 8943)
@@ -0,0 +1,35 @@
+#include <iostream>
+#include <iomanip>
+#include "../Points.h"
+
+int main()
+{
+ using namespace std;
+ using namespace cigma;
+
+ double coords[4*3] = {
+ -1, -1, -1,
+ +1, -1, -1,
+ -1, +1, -1,
+ -1, -1, +1
+ };
+
+ Points points;
+
+ points.set_data(coords, 4, 3);
+
+ cout << std::showpos
+ << std::fixed
+ << std::setprecision(1);
+
+ for (int i = 0; i < points.n_points(); i++)
+ {
+ for (int j = 0; j < points.n_dim(); j++)
+ {
+ cout << points(i,j) << " ";
+ }
+ cout << endl;
+ }
+
+ return 0;
+}
More information about the cig-commits
mailing list