Borderbasix

Operator.hpp
Go to the documentation of this file.
1 /*********************************************************************
2 * This file is part of the source code of BORDERBASIX software. *
3 * (C) B. Mourrain, INRIA *
4 **********************************************************************
5 History:
6 $Id: Operator.hpp,v 1.1.1.1 2006/10/06 08:01:40 trebuche Exp $
7 **********************************************************************/
8 #ifndef _Operator_H_
9 #define _Operator_H_
10 //----------------------------------------------------------------------
11 template<char x, class A> struct Op1;
12 template<char x, class A, class B> struct Op;
13 //----------------------------------------------------------------------
14 template <class A> struct Op<'-',A> {
15  const A & op;
16  Op1 () {};
17  Op1 (const Op1<'-',A> & p): op(p.op) {};
18  Op1 (const A & a) : op(a){};
19 };
20 //----------------------------------------------------------------------
21 template <class A, class B> struct Op<'+',A,B> {
22  const A & op1;
23  const B & op2;
24  Op () {};
25  Op(const Op<'+',A,B> & p): op1(p.op1), op2(p.op2) {};
26  Op(const A & a, const B & b) : op1(a), op2(b) {};
27 };
28 //----------------------------------------------------------------------
29 template <class A, class B> struct Op<'+',A,B> {
30  const A & op1;
31  const B & op2;
32  Op () {};
33  Op(const Op<'+',A,B> & p): op1(p.op1), op2(p.op2) {};
34  Op(const A & a, const B & b) : op1(a), op2(b) {};
35 };
36 //----------------------------------------------------------------------
37 template <class A, class B> struct Op<'-',A,B> {
38  const A & op1;
39  const B & op2;
40  Op () {};
41  Op(const Op<'-',A,B> & p): op1(p.op1), op2(p.op2) {};
42  Op(const A & a, const B & b) : op1(a), op2(b) {};
43 };
44 //----------------------------------------------------------------------
45 template <class A, class B> struct Op<'*',A,B> {
46  const A& op1;
47  const B& op2;
48  Op() {};
49  Op(const Op<'*',A,B> & p): op1(p.op1), op2(p.op2) {};
50  Op(const A & a, const B & b) : op1(a), op2(b) {};
51 };
52 //----------------------------------------------------------------------
53 template <class A, class B> struct Op<'.',A,B> {
54  const A& op1;
55  const B& op2;
56  Op() {};
57  Op(const Op<'.',A,B> & p): op1(p.op1), op2(p.op2) {};
58  Op(const A & a, const B & b) : op1(a), op2(b) {};
59 };
60 //----------------------------------------------------------------------
61 template <class A, class B> struct Op<'/',A,B> {
62  const A& op1;
63  const B& op2;
64  Op() {};
65  Op(const Op<'/',A,B> & p): op1(p.op1), op2(p.op2) {};
66  Op(const A & a, const B & b) : op1(a), op2(b) {};
67 };
68 //----------------------------------------------------------------------
69 template <class A, class B> struct Op<'%',A,B> {
70  const A& op1;
71  const B& op2;
72  Op() {};
73  Op(const Op<'%',A,B> & p): op1(p.op1), op2(p.op2) {};
74  Op(const A & a, const B & b) : op1(a), op2(b) {};
75 };
76 //----------------------------------------------------------------------
77 template <class A, class B> struct Op<'^',A,B> {
78  const A& op1;
79  const B& op2;
80  Op() {};
81  Op(const Op<'^',A,B> & p): op1(p.op1), op2(p.op2) {};
82  Op(const A & a, const B & b) : op1(a), op2(b) {};
83 };
84 
85 #endif // _Operator_H_
const A & op1
Definition: Operator.hpp:22
Op(const A &a, const B &b)
Definition: Operator.hpp:26
const A & op
Definition: Operator.hpp:15
Op1(const A &a)
Definition: Operator.hpp:18
Definition: Operator.hpp:21
Definition: Operator.hpp:37
const B & op2
Definition: Operator.hpp:23
Op(const A &a, const B &b)
Definition: Operator.hpp:42
Op1(const Op1<'-', A > &p)
Definition: Operator.hpp:17
const B & op2
Definition: Operator.hpp:39
const A & op1
Definition: Operator.hpp:38
Definition: Operator.hpp:11
Op(const Op<'+', A, B > &p)
Definition: Operator.hpp:25
MSKstreamtypee MSKint32t MSKint32t MSKint32t MSKint32t MSKint32t MSKint32t MSKint32t MSKint32t MSKint32t a
Definition: mosek.h:3833
Op()
Definition: Operator.hpp:40
Op()
Definition: Operator.hpp:24
Op(const Op<'-', A, B > &p)
Definition: Operator.hpp:41
Op1()
Definition: Operator.hpp:16
Definition: Operator.hpp:12
Home  |  Download & InstallContributions