Complex4.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2010 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/MEAL/MEAL/Complex4.h
10
11#ifndef __MEAL_Complex4_H
12#define __MEAL_Complex4_H
13
14#include "MEAL/Evaluable.h"
15#include "Matrix.h"
16
17template<typename T>
18struct EstimateTraits< Matrix< 4,4, std::complex<T> > >
19{
20 typedef Matrix<4,4, std::complex< Estimate<T> > > type;
21};
22
23template<typename T>
24void add_variance (Matrix< 4,4, std::complex<Estimate<T> > >& result,
25 double var, const Matrix< 4,4, std::complex< T > >& grad)
26{
27 for (unsigned i=0; i < 4; i++)
28 for (unsigned j=0; j < 4; j++)
29 add_variance (result[i][j], var, grad[i][j]);
30}
31
32namespace MEAL {
33
35 class Complex4 : public Evaluable< Matrix< 4,4, std::complex<double> > >
36 {
37 public:
38
40 static const char* Name;
41
43 virtual Complex4* clone () const;
44 };
45
46}
47
48#endif
Pure virtual base class of all complex-valued 4x4 matrix functions.
Definition Complex4.h:36
static const char * Name
The name of the class.
Definition Complex4.h:40
virtual Complex4 * clone() const
Clone method.
Definition Complex4.C:13
Namespace in which all modeling and calibration related code is declared.
Definition ExampleComplex2.h:16
STL namespace.
Works for most scalar types.
Definition Evaluable.h:22

Generated using doxygen 1.14.0