aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/jtutil/array.cc38
-rw-r--r--src/jtutil/fuzzy.cc14
-rw-r--r--src/jtutil/round.cc18
3 files changed, 43 insertions, 27 deletions
diff --git a/src/jtutil/array.cc b/src/jtutil/array.cc
index ced6b3f..afddac8 100644
--- a/src/jtutil/array.cc
+++ b/src/jtutil/array.cc
@@ -21,9 +21,11 @@
#include "jt/util++.hh"
#include "jt/array.hh"
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
// array1d - 1D array template
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
//
// This function constructs an array1d object.
@@ -41,7 +43,7 @@ array_ = new fpt[N_i()];
}
}
-//*****************************************************************************
+//******************************************************************************
//
// This function destroys an array1d object.
@@ -52,9 +54,11 @@ array1d<fpt>::~array1d()
delete[] array_;
}
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
// array2d - 2D array template
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
//
// This function constructs an array2d object.
@@ -80,7 +84,7 @@ offset_ = - subscript_unchecked(min_i_, min_j_);
// must use unchecked form here since setup isn't done yet
}
-//*****************************************************************************
+//******************************************************************************
//
// This function destroys an array2d object.
@@ -91,9 +95,11 @@ array2d<fpt>::~array2d()
delete[] array_;
}
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
// array3d - 3D array template
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
//
// This function constructs an array3d object.
@@ -122,7 +128,7 @@ offset_ = - subscript_unchecked(min_i_, min_j_, min_k_);
// must use unchecked form here since setup isn't done yet
}
-//*****************************************************************************
+//******************************************************************************
//
// This function destroys an array3d object.
@@ -133,9 +139,11 @@ array3d<fpt>::~array3d()
delete[] array_;
}
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
// array4d - 4D array template
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
//
// This function constructs an array4d object.
@@ -167,7 +175,7 @@ offset_ = - subscript_unchecked(min_i_, min_j_, min_k_, min_l_);
// must use unchecked form here since setup isn't done yet
}
-//*****************************************************************************
+//******************************************************************************
//
// This function destroys an array4d object.
@@ -178,9 +186,11 @@ array4d<fpt>::~array4d()
delete[] array_;
}
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
// *** template instantiations: array1d<int>, array[1234]d<{float,double}>
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
template class array1d<int>;
template class array2d<int>;
diff --git a/src/jtutil/fuzzy.cc b/src/jtutil/fuzzy.cc
index f6238de..609ba7a 100644
--- a/src/jtutil/fuzzy.cc
+++ b/src/jtutil/fuzzy.cc
@@ -13,7 +13,7 @@
#include "jt/stdc.h"
#include "jt/util++.hh"
-//*****************************************************************************
+//******************************************************************************
template <typename fpt>
bool fuzzy<fpt>::EQ(fpt x, fpt y)
@@ -24,7 +24,7 @@ fpt epsilon = jtutil::max(tolerance, tolerance*max_abs);
return jtutil::abs<fpt>(x-y) <= epsilon;
}
-//*****************************************************************************
+//******************************************************************************
template <typename fpt>
bool fuzzy<fpt>::is_integer(fpt x)
@@ -33,7 +33,7 @@ int i = round<fpt>::to_integer(x);
return EQ(x, fpt(i));
}
-//*****************************************************************************
+//******************************************************************************
template <typename fpt>
int fuzzy<fpt>::floor(fpt x)
@@ -43,7 +43,7 @@ return fuzzy<fpt>::is_integer(x)
: round<fpt>::floor(x);
}
-//*****************************************************************************
+//******************************************************************************
template <typename fpt>
int fuzzy<fpt>::ceiling(fpt x)
@@ -53,9 +53,11 @@ return fuzzy<fpt>::is_integer(x)
: round<fpt>::ceiling(x);
}
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
// *** instantiations of fuzzy template for <float> and <double>
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
// instantiation for <float>
template class fuzzy<float>;
diff --git a/src/jtutil/round.cc b/src/jtutil/round.cc
index 07bf04b..b5bfe7b 100644
--- a/src/jtutil/round.cc
+++ b/src/jtutil/round.cc
@@ -12,9 +12,11 @@
#include "jt/stdc.h"
#include "jt/util++.hh"
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
// round.hh -- template for rounding floating point values
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
//
// *** Implementation Notes ***
@@ -24,7 +26,7 @@
// values.
//
-//*****************************************************************************
+//******************************************************************************
// round to nearest integer, up for exact tie
template <typename fpt>
@@ -35,7 +37,7 @@ return (x >= 0.0)
: - int( (-x) + 0.5 ); // eg -3.6 --> - int(4.1) = -4
}
-//*****************************************************************************
+//******************************************************************************
template <typename fpt>
int round<fpt>::floor(fpt x)
@@ -45,7 +47,7 @@ return (x >= 0.0)
: - ceiling(-x);
}
-//*****************************************************************************
+//******************************************************************************
template <typename fpt>
int round<fpt>::ceiling(fpt x)
@@ -55,9 +57,11 @@ return (x >= 0.0)
: - floor(-x);
}
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
// *** instantiations of round template for <float> and <double>
-//*****************************************************************************
+//******************************************************************************
+//******************************************************************************
// instantiation for <float>
template class round<float>;