NeoPZ
TPZConstrainedRandom.h
Go to the documentation of this file.
1 /*
2  * File: TPZConstrainedRandom.h
3  * Author: quinelato
4  *
5  * Created on 5 de Dezembro de 2017, 13:37
6  */
7 
8 #ifndef TPZCONSTRAINEDRANDOM_H
9 #define TPZCONSTRAINEDRANDOM_H
10 
11 #include "TPZRandom.h"
12 
13 template <class TVar>
14 class TPZConstrainedRandom : virtual public TPZRandom<TVar> {
15 public:
16  TPZConstrainedRandom(TVar begin, TVar end) : TPZRandom<TVar>(), fbegin(begin), fend(end){
17  }
18  TPZConstrainedRandom(const TPZConstrainedRandom<TVar>& orig) : TPZRandom<TVar>(orig), fbegin(orig.fbegin), fend(orig.fend) {
19  }
20 
21  virtual TVar GetBegin() const {
22  return fbegin;
23  }
24 
25  virtual TVar GetEnd() const {
26  return fend;
27  }
28 
30 
31  }
32 protected :
33  TVar fbegin, fend;
34 };
35 
36 #endif /* TPZCONSTRAINEDRANDOM_H */
37 
virtual TVar GetEnd() const
virtual TVar GetBegin() const
TPZConstrainedRandom(TVar begin, TVar end)
TPZConstrainedRandom(const TPZConstrainedRandom< TVar > &orig)