LCOV - code coverage report
Current view: top level - builds/barbot/Cosmos/src/Simulator - clientsim.hpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 8 10 80.0 %
Date: 2021-06-16 15:43:28 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /*******************************************************************************
       2             :  *                                                                             *
       3             :  * Cosmos:(C)oncept et (O)utils (S)tatistique pour les (Mo)deles               *
       4             :  * (S)tochastiques                                                             *
       5             :  *                                                                             *
       6             :  * Copyright (C) 2009-2012 LSV & LACL                                          *
       7             :  * Authors: Paolo Ballarini Benoît Barbot & Hilal Djafri                       *
       8             :  * Website: http://www.lsv.ens-cachan.fr/Software/cosmos                       *
       9             :  *                                                                             *
      10             :  * This program is free software; you can redistribute it and/or modify        *
      11             :  * it under the terms of the GNU General Public License as published by        *
      12             :  * the Free Software Foundation; either version 3 of the License, or           *
      13             :  * (at your option) any later version.                                         *
      14             :  *                                                                             *
      15             :  * This program is distributed in the hope that it will be useful,             *
      16             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of              *
      17             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
      18             :  * GNU General Public License for more details.                                *
      19             :  *                                                                             *
      20             :  * You should have received a copy of the GNU General Public License along     *
      21             :  * with this program; if not, write to the Free Software Foundation, Inc.,     *
      22             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                 *
      23             :  * file clientsim.hpp created by Benoît Barbot on 16/01/2017.                  *
      24             :  *******************************************************************************
      25             :  */
      26             : 
      27             : 
      28             : #ifndef clientsim_h
      29             : #define clientsim_h
      30             : 
      31             : #include <iostream>
      32             : 
      33             : #include "BatchR.hpp"
      34             : #include "Simulator.hpp"
      35             : #include "RareEvents/SimulatorRE.hpp"
      36             : #include "RareEvents/SimulatorBoundedRE.hpp"
      37             : #include "RareEvents/SimulatorContinuousBounded.hpp"
      38             : #include "Polynome.hpp"
      39             : #include "MarkovChain.hpp"
      40             : #include "parameters.hpp"
      41             : 
      42             : // Handler for interuption of the server
      43             : void signalHandler(int);
      44             : 
      45             : template<class SIM>
      46          21 : void setSimulator(SIM& sim,int argc, char* argv[], parameters &P){
      47          21 :     if( argc ==0){
      48           0 :         sim.initRandomGenerator(0);
      49           0 :         return;
      50             :     }
      51          21 :     if(P.interactive)P.verbose=6;
      52             :     
      53          21 :     P.seed=atoi(argv[2]);
      54          21 :     sim.initRandomGenerator(P.seed);
      55             :     
      56          21 :     sim.logValue(P.dataraw);
      57          21 :     sim.logTrace(P.datatrace,P.sampleResol);
      58          21 :     sim.dotFile = P.dotfile;
      59             :     
      60             : }
      61             : 
      62             : void readParameters(std::ifstream& i);
      63             : 
      64             : 
      65             : 
      66             : 
      67             : #endif /* clientsim_h */

Generated by: LCOV version 1.13