Skip to content

Instantly share code, notes, and snippets.

@luisibanez
Created October 26, 2010 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luisibanez/647335 to your computer and use it in GitHub Desktop.
Save luisibanez/647335 to your computer and use it in GitHub Desktop.
test
@gabehart
Copy link

typedef unsigned long long[1] MeasurementVectorType;

@luisibanez
Copy link
Author

typedef Self[1] MeasurementVectorType;

@luisibanez
Copy link
Author

typedef
itk::NumericTraits< T[1] >

@gabehart
Copy link

template< >
class NumericTraits< bool > :public vcl_numeric_limits< bool >

@gabehart
Copy link

template< >
class NumericTraits< bool > :public vcl_numeric_limits< bool >
{
public:
typedef bool ValueType;
typedef bool PrintType;
typedef unsigned char AbsType;
typedef unsigned char AccumulateType;
typedef double RealType;
typedef RealType ScalarRealType;
typedef float FloatType;

static const bool ITKCommon_EXPORT Zero;
static const bool ITKCommon_EXPORT One;

static bool min() { return false; }
static bool max() { return true; }
static bool min(bool) { return min(); }
static bool max(bool) { return max(); }
static bool NonpositiveMin() { return false; }
static bool IsPositive(bool val) { return val; }
static bool IsNonpositive(bool val) { return !val; }
static bool IsNegative(bool val) { return val ? false : false; }
static bool IsNonnegative(bool val) { return val ? true : true; }
static bool ZeroValue() { return Zero; }
static bool OneValue() { return One; }
};

@gabehart
Copy link

typedef typename ValueType[1] MeasurementVectorType;

@luisibanez
Copy link
Author

typedef Self[1] MeasurementVectorType;

typedef Self MeasurementVectorType[1];

@luisibanez
Copy link
Author

template
class NumericTraits
{
};

template
class NumericTraits< T[1] >
{
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment