123456789101112131415161718192021222324252627282930313233343536 |
- #ifndef __STIMULUSSEQUENCE_HPP__
- #define __STIMULUSSEQUENCE_HPP__
- #include <vector>
- #include <string>
- #include <gsl/gsl_rng.h>
- typedef struct _SequenceFileHeader {
- char finfo[12]; // "sequence"
- char version[4]; // "001"
- int Length;
- int MinStim;
- int MaxStim;
- } SequenceFileHeader;
- class StimulusSequence
- {
- protected:
- std::string SequenceFileName; //directory and filename
- SequenceFileHeader SHeader;
- std::vector<int> CurStimSequence;
- int SeqPointer;
- int Length;
- public:
- StimulusSequence();
- StimulusSequence(const char* _SequenceFileName);
- ~StimulusSequence();
- bool Load(const char* _SequenceFileName);
- void GenerateRandomSequence(int, int, const gsl_rng* gslr);
- int GetNextSeqElement();
- int GetNextRandomElement(const gsl_rng* gslr);
- };
- #endif // __STIMULUSSEQUENCE_HPP__
|