|
TPCCLIB
|
Simulation of 2-tissue compartmental models. More...
#include "tpcclibConfig.h"#include <stdio.h>#include <stdlib.h>#include <math.h>#include <time.h>#include <string.h>#include "tpccm.h"Go to the source code of this file.
Functions | |
| int | simC2 (double *t, double *ca, const int nr, const double k1, const double k2, const double k3, const double k4, double *ct, double *cta, double *ctb) |
| int | simC2_i (double *t, double *cai, const int nr, const double k1, const double k2, const double k3, const double k4, double *ct, double *cta, double *ctb) |
Simulation of 2-tissue compartmental models.
Definition in file sim2cm.c.
| int simC2 | ( | double * | t, |
| double * | ca, | ||
| const int | nr, | ||
| const double | k1, | ||
| const double | k2, | ||
| const double | k3, | ||
| const double | k4, | ||
| double * | ct, | ||
| double * | cta, | ||
| double * | ctb ) |
Simulate tissue TAC using two-tissue compartment model and plasma TAC, at plasma TAC times.
Memory for ct must be allocated in the calling program. To retrieve the separate tissue compartment TACs, pointer to allocated memory for cta and/or ctb can be given; if compartmental TACs are not required, NULL pointer can be given instead.
The units of rate constants must be related to the time unit; 1/min and min, or 1/sec and sec.
| t | Array of time values. |
| ca | Array of arterial activities. |
| nr | Number of values in TACs. |
| k1 | Rate constant of the model. |
| k2 | Rate constant of the model. |
| k3 | Rate constant of the model. |
| k4 | Rate constant of the model. |
| ct | Pointer for TAC array to be simulated; must be allocated. |
| cta | Pointer for 1st compartment TAC to be simulated, or NULL. |
| ctb | Pointer for 2nd compartment TAC to be simulated, or NULL. |
Definition at line 31 of file sim2cm.c.
| int simC2_i | ( | double * | t, |
| double * | cai, | ||
| const int | nr, | ||
| const double | k1, | ||
| const double | k2, | ||
| const double | k3, | ||
| const double | k4, | ||
| double * | ct, | ||
| double * | cta, | ||
| double * | ctb ) |
Simulate tissue TAC using two-tissue compartment model and plasma TAC, at plasma TAC times.
Memory for ct must be allocated in the calling program. To retrieve the separate tissue compartment TACs, pointer to allocated memory for cta and/or ctb can be given; if compartmental TACs are not required, NULL pointer can be given instead.
The units of rate constants must be related to the time unit; 1/min and min, or 1/sec and sec.
This version uses integral of arterial TAC as input function. Only advantage over simC2() is that the calculation of integral can be fully controlled and possibly more precise in some situations.
| t | Array of time values. |
| cai | Array of AUC 0-t of arterial activities. |
| nr | Number of values in TACs. |
| k1 | Rate constant of the model. |
| k2 | Rate constant of the model. |
| k3 | Rate constant of the model. |
| k4 | Rate constant of the model. |
| ct | Pointer for TAC array to be simulated; must be allocated. |
| cta | Pointer for 1st compartment TAC to be simulated, or NULL. |
| ctb | Pointer for 2nd compartment TAC to be simulated, or NULL. |
Definition at line 124 of file sim2cm.c.