|
ADDM.cpp
|
Implementation of a single DDMTrial object. More...
#include <ddm.h>
Public Member Functions | |
| DDMTrial (unsigned int RT, int choice, float valueLeft, float valueRight) | |
| Construct a new DDMTrial object. | |
| DDMTrial () | |
| Construct an empty DDMTrial object. | |
Static Public Member Functions | |
| static void | writeTrialsToCSV (vector< DDMTrial > trials, string filename) |
| Write a vector of DDMTrials to a CSV file. | |
| static vector< DDMTrial > | loadTrialsFromCSV (string filename) |
| Load a dataset of DDMTrials into program memory. | |
Public Attributes | |
| unsigned int | RT |
| int | choice |
| float | valueLeft |
| float | valueRight |
| vector< float > | RDVs |
| int | timeStep |
Implementation of a single DDMTrial object.
A DDMTrial can either be generated by simulating data trials or loading from a CSV. A single trial represents an individual binary perceptual choice made by one subject. These trials be aggregated together for model fitting and likelihood computations.
| DDMTrial::DDMTrial | ( | unsigned int | RT, |
| int | choice, | ||
| float | valueLeft, | ||
| float | valueRight ) |
Construct a new DDMTrial object.
| RT | Response time in milliseconds. |
| choice | Either -1 for the left item or +1 for the right item. |
| valueLeft | Value of the left item. |
| valueRight | Value of the right item. |
|
inline |
Construct an empty DDMTrial object.
|
static |
Load a dataset of DDMTrials into program memory.
| filename | Location of the data trials. |
|
static |
Write a vector of DDMTrials to a CSV file.
| trials | Vector of trials to be saved. |
| filename | File to store the trials in. |
| int DDMTrial::choice |
Either -1 for the left item or +1 for the right item.
| vector<float> DDMTrial::RDVs |
The RDV signal recorded at each timestep.
| unsigned int DDMTrial::RT |
Response time in milliseconds.
| int DDMTrial::timeStep |
The length of each timestep in milliseconds.
| float DDMTrial::valueLeft |
Value of the left item.
| float DDMTrial::valueRight |
Value of the right items.