EcoliSimulator  2.0.1a
fraction_run_file.cpp File Reference
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
#include <cmath>
#include "constants.h"

Macros

#define max(a, b)   ( ((a) > (b)) ? (a) : (b) )
 
#define min(a, b)   ( ((a) < (b)) ? (a) : (b) )
 

Functions

void fraction_run_file (string file_write, int cont_salti, vector< int > tau_vector, int n_tau_x, double dx, double tau_max, double somma_tau)
 

Macro Definition Documentation

#define max (   a,
 
)    ( ((a) > (b)) ? (a) : (b) )
#define min (   a,
 
)    ( ((a) < (b)) ? (a) : (b) )

Function Documentation

void fraction_run_file ( string  file_write,
int  cont_salti,
vector< int >  tau_vector,
int  n_tau_x,
double  dx,
double  tau_max,
double  somma_tau 
)

This function calculate the fraction of run/tumble bigger then a given value.

Parameters
file_writewe save the data in the file pass by file_write
cont_saltinumber total jumps
vectorof run/tumble (t) within the range of the index i, i.e. tau_min*dx*(i-1)<t< tau_min*dx*i
n_tau_xnumber of divition of length run/tumble
dxtime-step in divition of the run/tumble interval
tau_maxmaximum tau to be display, left limit of the interval [0,tau_max] where we do the fraction of run
somma_tausum of all the tau of the same kind (up/down/const etc. gradient)