00001
00002
00003
00004
00005 #ifndef DATA_H
00006 #define DATA_H
00007
00008 #include <cmath>
00009 #include <vector>
00010 #include <iostream>
00011 #include "errors.h"
00012
00022 class PsiData
00023 {
00024 private:
00025 std::vector <double> intensities;
00026 std::vector <int> Ntrials;
00027 std::vector <int> Ncorrect;
00028 std::vector <double> Pcorrect;
00029 std::vector <double> logNoverK;
00030 int Nalternatives;
00031 public:
00032 PsiData (
00033 std::vector<double> x,
00034 std::vector<int> N,
00035 std::vector<int> k,
00036 int nAFC
00037 );
00038 PsiData (
00039 std::vector<double> x,
00040 std::vector<int> N,
00041 std::vector<double> p,
00042 int nAFC
00043 );
00044 ~PsiData ( void ) {}
00045 void setNcorrect (
00046 const std::vector<int>& newNcorrect
00047 );
00048 const std::vector<double>& getIntensities ( void ) const;
00049 const std::vector<int>& getNtrials ( void ) const;
00050 const std::vector<int>& getNcorrect ( void ) const;
00051 const std::vector<double>& getPcorrect ( void ) const;
00052 double getIntensity ( unsigned int i ) const;
00053 int getNtrials ( unsigned int i ) const;
00054 int getNcorrect ( unsigned int i ) const;
00055 double getPcorrect ( unsigned int i ) const;
00056 int getNalternatives ( void ) const;
00057 unsigned int getNblocks ( void ) const { return intensities.size(); }
00058 double getNoverK (unsigned int i ) const;
00059 std::vector<int> nonasymptotic ( void ) const;
00060 };
00061
00062 #endif