Version: 9.16.0
Aleatoire Class Referenceabstract

#include <aleas.hxx>

Inheritance diagram for Aleatoire:
Collaboration diagram for Aleatoire:

Public Member Functions

 Aleatoire (long)
 
virtual std::vector< double > * gen (void)
 
virtual void fill (std::vector< double > &)
 
virtual double tire (void)=0
 

Protected Attributes

long size
 

Detailed Description

Definition at line 26 of file aleas.hxx.

Constructor & Destructor Documentation

◆ Aleatoire()

Aleatoire::Aleatoire ( long  sz)

Definition at line 98 of file aleas.cxx.

99{
100 size = sz;
101 initrand();
102}
static void initrand(void)
Definition: aleas.cxx:37
long size
Definition: aleas.hxx:29

References initrand(), and size.

Member Function Documentation

◆ fill()

void Aleatoire::fill ( std::vector< double > &  ret)
virtual

Reimplemented in Sphere, and SpherePositif.

Definition at line 104 of file aleas.cxx.

105{
106 int i;
107
108 for (i=0; i<size; i++) ret[i] = tire();
109}
virtual double tire(void)=0

References yacsorb.CORBAEngineTest::i, size, and tire().

Referenced by Sphere::fill(), and gen().

◆ gen()

std::vector< double > * Aleatoire::gen ( void  )
virtual

Definition at line 111 of file aleas.cxx.

112{
113 std::vector<double> *ret;
114
115 ret = new std::vector<double>(size);
116 fill(*ret);
117 return ret;
118}
virtual void fill(std::vector< double > &)
Definition: aleas.cxx:104

References fill(), and size.

Referenced by Point::next().

◆ tire()

virtual double Aleatoire::tire ( void  )
pure virtual

Implemented in Cube, Normale, and NormalePositif.

Referenced by fill().

Member Data Documentation

◆ size

long Aleatoire::size
protected

Definition at line 29 of file aleas.hxx.

Referenced by Aleatoire(), fill(), Sphere::fill(), SpherePositif::fill(), and gen().


The documentation for this class was generated from the following files: