OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
TpsMonomial.h
Go to the documentation of this file.
1#ifndef CLASSIC_TpsMonomial_HH
2#define CLASSIC_TpsMonomial_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: TpsMonomial.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1.2.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: TpsMonomial
13//
14// ------------------------------------------------------------------------
15// Class category: Algebra
16// ------------------------------------------------------------------------
17//
18// $Date: 2002/03/25 20:44:15 $
19// $Author: dbruhwil $
20//
21// ------------------------------------------------------------------------
22
23#include "Algebra/Array1D.h"
24
25
26// Class TpsMonomial
27// ------------------------------------------------------------------------
29// A representation of the exponents for a Tps monomial.
30
32
33public:
34
36 // Array of zeros with length [b]nVar[/b], defines [b]nVar[/b] variables
37 // with zero exponent each.
38 TpsMonomial(int nVar);
39
41 // Array with length [b]nVar[/b], define variable with index [b]var[/b].
42 TpsMonomial(int nVar, int var);
43
45 TpsMonomial(const TpsMonomial &);
47 const TpsMonomial &operator=(const TpsMonomial &);
48
50 // Return a reference to the exponent of variable [b]index[/b].
51 int &operator[](int index);
52
54 // Return value of the exponent of variable [b]index[/b].
55 int operator[](int index) const;
56
58 // Return the exponent set for the product of the monomials denoted by
59 // [b]this[/b] and [b]rhs[/b], i.e. the sum of the exponents for each
60 // variable.
61 TpsMonomial operator*(const TpsMonomial &rhs) const;
62
64 // Convert the monomial to the corresponding Giorgilli index.
65 int getIndex() const;
66
68 // Compute the monomial's order, i.e. the sum of all exponents.
69 int getOrder() const;
70
72 // Return the monomial's number of variables, i.e. the number of exponents.
73 int getVariables() const;
74
75private:
76
77 // The monomial's exponents.
79};
80
81#endif // CLASSIC_TpsMonomial_HH
Exponent array for Tps<T>.
Definition: TpsMonomial.h:31
int getIndex() const
Convert.
Definition: TpsMonomial.cpp:77
int getVariables() const
Get variables.
Definition: TpsMonomial.cpp:94
int getOrder() const
Get order.
Definition: TpsMonomial.cpp:83
int & operator[](int index)
Get exponent.
Definition: TpsMonomial.cpp:59
const TpsMonomial & operator=(const TpsMonomial &)
Definition: TpsMonomial.cpp:53
TpsMonomial operator*(const TpsMonomial &rhs) const
Product.
Definition: TpsMonomial.cpp:69
Array1D< int > array
Definition: TpsMonomial.h:78