File: multipleStochasticProcess.cpp

package info (click to toggle)
fastml 3.11-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,772 kB
  • sloc: cpp: 48,522; perl: 3,588; ansic: 819; makefile: 386; python: 83; sh: 55
file content (38 lines) | stat: -rw-r--r-- 869 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "multipleStochasticProcess.h"
#include "errorMsg.h"

multipleStochasticProcess::multipleStochasticProcess()
{
}


multipleStochasticProcess::~multipleStochasticProcess()
{
}


void multipleStochasticProcess::copy(const multipleStochasticProcess *pOther)
{
	_spVec = pOther->_spVec;
	_spProb = pOther->_spProb;
}


MDOUBLE multipleStochasticProcess::getProb(int spPlace) const {
	if (spPlace >= _spProb.size())
		errorMsg::reportError("error in multipleStochasticProcess::getProb");
	return _spProb[spPlace];
}

stochasticProcess* multipleStochasticProcess::getSp(int spPlace) {
	if (spPlace >= _spVec.size())
		errorMsg::reportError("error in multipleStochasticProcess::getSp");
	return &_spVec[spPlace];
}

void multipleStochasticProcess::setSpVec(vector<stochasticProcess>& spVec)
{
	_spVec.clear();
	_spVec = spVec;
}