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

Generated using doxygen 1.14.0