Commit a04aed78 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

simplerigidarray test works on my machine (pantje)

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 2467
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 32e2bbe7
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: dump_simplerigidarray.h,v 1.3 2007-12-07 16:50:56 tforb Exp $
* $Id: dump_simplerigidarray.h,v 1.4 2007-12-07 18:01:26 tforb Exp $
* \author Thomas Forbriger
* \date 19/12/2002
*
......@@ -41,7 +41,7 @@
#define AFF_DUMP_SIMPLERIGIDARRAY_H_VERSION \
"AFF_DUMP_SIMPLERIGIDARRAY_H V1.0 "
#define AFF_DUMP_SIMPLERIGIDARRAY_H_CVSID \
"$Id: dump_simplerigidarray.h,v 1.3 2007-12-07 16:50:56 tforb Exp $"
"$Id: dump_simplerigidarray.h,v 1.4 2007-12-07 18:01:26 tforb Exp $"
#include<iostream>
#include<aff/lib/simplearray.h>
......@@ -54,7 +54,7 @@ using std::endl;
*
* \ingroup group_helpers
*/
template<class T, int N>
template<class T, Tsize N>
void dump(const aff::SimpleRigidArray<T,N>& array, std::ostream& os=std::cout)
{
int i=0;
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: types.h,v 1.6 2007-12-07 16:50:56 tforb Exp $
* $Id: types.h,v 1.7 2007-12-07 18:01:26 tforb Exp $
* \author Thomas Forbriger
* \since 08/12/2002
*
......@@ -42,26 +42,26 @@
#define AFF_TYPES_H_VERSION \
"AFF_TYPES_H V1.0 "
#define AFF_TYPES_H_CVSID \
"$Id: types.h,v 1.6 2007-12-07 16:50:56 tforb Exp $"
"$Id: types.h,v 1.7 2007-12-07 18:01:26 tforb Exp $"
#include <cstddef>
namespace aff {
/*
//! Type to hold an array dimensionality.
typedef unsigned short int Tdim;
//! Type to hold the size of an array dimension.
typedef size_t Tsize;
//! Type to hold an array's subscript value.
typedef ptrdiff_t Tsubscript;
*/
/*
//! Type to hold an array dimensionality.
typedef unsigned int Tdim;
//! Type to hold the size of an array dimension.
typedef unsigned int Tsize;
//! Type to hold an array's subscript value.
typedef int Tsubscript;
*/
} // namespace aff
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: simplearraytest.cc,v 1.7 2007-12-07 16:50:57 tforb Exp $
* $Id: simplearraytest.cc,v 1.8 2007-12-07 18:01:26 tforb Exp $
* \author Thomas Forbriger
* \date 25/05/2002
*
......@@ -38,7 +38,7 @@
#define AFF_SIMPLEARRAYTEST_CC_VERSION \
"AFF_SIMPLEARRAYTEST_CC V1.3"
#define AFF_SIMPLEARRAYTEST_CC_CVSID \
"$Id: simplearraytest.cc,v 1.7 2007-12-07 16:50:57 tforb Exp $"
"$Id: simplearraytest.cc,v 1.8 2007-12-07 18:01:26 tforb Exp $"
/*! \example tests/simplearraytest.cc
*
......@@ -57,38 +57,13 @@
#include<iostream>
#include<aff/array.h>
//#include<aff/dump.h>
//#include<aff/lib/dump_simplerigidarray.h>
#include<aff/lib/dump_macros.h>
#include<aff/dump.h>
using std::cout;
using std::endl;
using namespace aff;
namespace aff {
template<typename T, int N>
void dump(const aff::SimpleRigidArray<T,N>& array, std::ostream& os=std::cout)
{
cout << "This is my dump of size " << N << endl;
int i=0;
for (aff::Tsize k=0; k<N; k++)
{
if (!i) { os << " "; }
os.width(9);
os << array[k] << " ";
if (++i>7) { i=0; os << endl; }
}
os << endl;
}
}
template<typename T, Tsize N>
Tsize myf(aff::SimpleRigidArray<T,N> a)
{
return(N);
}
//! print result of function
#define FUNC( func ) cout << #func << "=" << func << endl
......@@ -132,8 +107,6 @@ int main()
cout << "SimpleRigidArray<double, 6> A,B(8.);" << endl;
cout << "SimpleRigidArray<int, 4> C,D(100);" << endl;
myf(A);
DUMP( A );
DUMP( B );
DUMP( C );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment