fixed Plotter, fixed default value in BM1D.cc
This commit is contained in:
		
							parent
							
								
									6df0253d50
								
							
						
					
					
						commit
						b2322306b5
					
				
							
								
								
									
										15
									
								
								BM1D.cc
								
								
								
								
							
							
						
						
									
										15
									
								
								BM1D.cc
								
								
								
								
							| 
						 | 
					@ -35,6 +35,19 @@ int main(int argc, char* argv[])
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        //default runs with less parameters
 | 
					        //default runs with less parameters
 | 
				
			||||||
 | 
							random_type = 'l';
 | 
				
			||||||
 | 
							nSteps = 1000;
 | 
				
			||||||
 | 
							nRuns = 10;
 | 
				
			||||||
 | 
							p0 = 0.5;
 | 
				
			||||||
 | 
							p1 = 0;
 | 
				
			||||||
 | 
							x1 = 20;
 | 
				
			||||||
 | 
							x2 = 30;
 | 
				
			||||||
 | 
							mu1 = 2;
 | 
				
			||||||
 | 
							mu2 = 2;
 | 
				
			||||||
 | 
							sigma1 = 0.3;
 | 
				
			||||||
 | 
							sigma2 = 1;
 | 
				
			||||||
 | 
							vis = 1;
 | 
				
			||||||
 | 
							typeOfRun = 1;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -55,7 +68,7 @@ int main(int argc, char* argv[])
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Plotter* myPlotter = new Plotter(true);
 | 
					  Plotter* myPlotter = new Plotter(vis==1);
 | 
				
			||||||
  myPlotter->Plot(nRuns, nSteps, myBM1DProcess->GetT(), myBM1DProcess->GetX()); 
 | 
					  myPlotter->Plot(nRuns, nSteps, myBM1DProcess->GetT(), myBM1DProcess->GetX()); 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  App.Run();
 | 
					  App.Run();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,12 @@
 | 
				
			||||||
#include "Plotter.hh"
 | 
					#include "Plotter.hh"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Plotter::Plotter(bool draw)
 | 
					Plotter::Plotter(bool draw_par = false)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					draw = draw_par;
 | 
				
			||||||
if(draw)
 | 
					if(draw)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
	draw = draw;
 | 
					 | 
				
			||||||
	canv = new TCanvas("canc","display",800,400);
 | 
						canv = new TCanvas("canc","display",800,400);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
//g1 = new TGraph();
 | 
					 | 
				
			||||||
mg = new TMultiGraph();
 | 
					mg = new TMultiGraph();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
void Plotter::Plot(Int_t numRuns, Int_t nSteps, std::vector<Double_t> t, std::vector<Double_t> x)
 | 
					void Plotter::Plot(Int_t numRuns, Int_t nSteps, std::vector<Double_t> t, std::vector<Double_t> x)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue