ROOT  6.06/09
Reference Guide
Macros | Typedefs | Functions | Variables
simanTSP.cxx File Reference
#include <cmath>
#include <vector>
#include <algorithm>
#include "Math/GSLSimAnnealing.h"
#include "Math/GSLRndmEngines.h"
#include "Math/SMatrix.h"
#include "Math/Math.h"
#include "TH1.h"
#include "TGraph.h"
#include "TCanvas.h"
#include "TApplication.h"
+ Include dependency graph for simanTSP.cxx:

Go to the source code of this file.

Macros

#define N_CITIES   (sizeof(cities)/sizeof(Stsp_city))
 

Typedefs

typedef struct s_tsp_city Stsp_city
 

Functions

double city_distance (Stsp_city c1, Stsp_city c2)
 
void print_distance_matrix ()
 
void simanTSP (bool debug=true)
 
void do_all_perms (MySimAnFunc &f, int offset)
 
void FullSearch ()
 
int main (int argc, char **argv)
 

Variables

bool showGraphics = false
 
Stsp_city cities []
 
double distance_matrix [N_CITIES][N_CITIES]
 
unsigned int r1 [N_CITIES]
 
unsigned int r2 [N_CITIES]
 
unsigned int r3 [N_CITIES]
 
unsigned int nfiter = 0
 
double best_E
 
double second_E
 
double third_E
 

Macro Definition Documentation

#define N_CITIES   (sizeof(cities)/sizeof(Stsp_city))

Definition at line 53 of file simanTSP.cxx.

Referenced by print_distance_matrix(), and simanTSP().

Typedef Documentation

typedef struct s_tsp_city Stsp_city

Definition at line 38 of file simanTSP.cxx.

Function Documentation

double city_distance ( Stsp_city  c1,
Stsp_city  c2 
)

Definition at line 58 of file simanTSP.cxx.

void do_all_perms ( MySimAnFunc &  f,
int  offset 
)

Definition at line 329 of file simanTSP.cxx.

Referenced by FullSearch().

void FullSearch ( )

Definition at line 406 of file simanTSP.cxx.

int main ( int  argc,
char **  argv 
)

Definition at line 448 of file simanTSP.cxx.

void print_distance_matrix ( )

Definition at line 85 of file simanTSP.cxx.

void simanTSP ( bool  debug = true)

Definition at line 244 of file simanTSP.cxx.

Referenced by main().

Variable Documentation

double best_E

Definition at line 325 of file simanTSP.cxx.

Referenced by do_all_perms().

Stsp_city cities[]
Initial value:
= {{"Santa Fe", 35.68, 105.95},
{"Phoenix", 33.54, 112.07},
{"Albuquerque", 35.12, 106.62},
{"Clovis", 34.41, 103.20},
{"Durango", 37.29, 107.87},
{"Dallas", 32.79, 96.77},
{"Tesuque", 35.77, 105.92},
{"Grants", 35.15, 107.84},
{"Los Alamos", 35.89, 106.28},
{"Las Cruces", 32.34, 106.76},
{"Cortez", 37.35, 108.58},
{"Gallup", 35.52, 108.74}}

Definition at line 40 of file simanTSP.cxx.

Referenced by simanTSP().

double distance_matrix[N_CITIES][N_CITIES]

Definition at line 55 of file simanTSP.cxx.

Referenced by print_distance_matrix().

unsigned int nfiter = 0

Definition at line 324 of file simanTSP.cxx.

unsigned int r1[N_CITIES]

Definition at line 321 of file simanTSP.cxx.

Referenced by ROOT::Vc::AVX::_mm256_blend_epi16(), ROOT::Vc::AVX::_mm256_blendv_epi8(), TLatex::Analyse(), TSpectrum3::Background(), TSpectrum2::Background(), ClassImp(), TGDMLWrite::CreateFakeCtub(), TDecompBK::Decompose(), TSpectrum2Fit::Deramp2(), TSpectrum2Fit::Derampx(), TSpectrumFit::Derb(), TSpectrum2Fit::Derbx(), TSpectrum2Fit::Derby(), TSpectrumFit::Derderi0(), TSpectrum2Fit::Derderi01(), TSpectrum2Fit::Derderi02(), TSpectrum2Fit::Derderj02(), TSpectrumFit::Derdersigma(), TSpectrum2Fit::Derdersigmax(), TSpectrum2Fit::Derdersigmay(), TSpectrumFit::Deri0(), TSpectrum2Fit::Deri01(), TSpectrum2Fit::Deri02(), TSpectrum2Fit::Derj02(), TSpectrumFit::Ders(), TSpectrumFit::Dersigma(), TSpectrum2Fit::Dersigmax(), TSpectrum2Fit::Dersigmay(), TSpectrum2Fit::Dersx(), TSpectrum2Fit::Dersxy(), TSpectrum2Fit::Dersy(), TSpectrumFit::Dert(), TSpectrum2Fit::Dertx(), TSpectrum2Fit::Dertxy(), TSpectrum2Fit::Derty(), TCrown::DistancetoPrimitive(), TEllipse::DistancetoPrimitive(), TGeoSphere::DistFromInside(), TGeoSphere::DistFromOutside(), TGeoCone::DistToCone(), TGeoConeSeg::DistToCons(), TCreatePrimitives::Ellipse(), RooBukinPdf::evaluate(), TCurlyArc::ExecuteEvent(), TEllipse::ExecuteEvent(), TDataSetManagerAliEn::ExpandRunSpec(), RooAddPdf::expectedEvents(), TGeoShape::FillBuffer3D(), TH2::FillRandom(), TH3::FillRandom(), TH1::FillRandom(), TPainter3dAlgorithms::FindVisibleDraw(), Roo2DKeysPdf::g(), TF1::GetQuantiles(), TH1::GetRandom(), TF1::GetRandom(), TH2::GetRandom2(), TH3::GetRandom3(), gsl_poly_complex_solve_cubic(), handle_file_request(), main(), TEveCalo2DGL::MakeRhoZCell(), TEveCalo2DGL::MakeRPhiCell(), TGWin32::MapRaised(), TPainter3dAlgorithms::ModifyScreen(), ROOT::Minuit2::GaussRandomGen::operator()(), TView3D::PadRange(), MainWindow::paintEvent(), TGraph2DPainter::PaintTriangles_new(), TGraph2DPainter::PaintTriangles_old(), piRandom(), TUnfoldSys::PrepareUncorrEmat(), put_file(), TEveCalo3DGL::RenderBarrelCell(), TEveCalo3DGL::RenderGridEndCap(), TGeoPgon::Rpg(), TGeoShape::SafetySeg(), TSpectrum3::SearchFast(), TSpectrum3::SearchHighRes(), TEllipse::SetR1(), THelix::SetRange(), TRadialGradient::SetStartEndR1R2(), TSpectrumFit::Shape(), TSpectrum2Fit::Shape2(), TEllipse::TEllipse(), test17(), test_smatrix_op(), test_smatrix_sym_op(), test_tmatrix_op(), test_tmatrix_sym_op(), testGauss(), testIO(), testQuasiRandom(), testRotations3D(), testUniform(), testVectorIO(), unuranSimple(), RooAddModel::updateCoefficients(), RooAddPdf::updateCoefficients(), and TMath::Voigt().

unsigned int r2[N_CITIES]

Definition at line 322 of file simanTSP.cxx.

Referenced by TEveBoxSet::AddEllipticCone(), TSpectrum3::Background(), TSpectrum2::Background(), TSpline5::BuildCoeff(), ClassImp(), TGeoSphere::ComputeNormal(), TGeoEltu::Contains(), TGeoTube::Contains(), TGeoSphere::Contains(), TGeoCone::Contains(), TGeoPcon::Contains(), TGeoHype::Contains(), TGeoCtub::Contains(), TGDMLWrite::CreateFakeCtub(), TSpectrumFit::Derderi0(), TSpectrumFit::Derdersigma(), TSpectrumFit::Deri0(), ROOT::Math::RichardsonDerivator::DerivativeForward(), TSpectrumFit::Dersigma(), TCrown::DistancetoPrimitive(), TEllipse::DistancetoPrimitive(), TSpider::DistancetoPrimitive(), TGeoSphere::DistFromInside(), TGeoSphere::DistFromOutside(), TGeoPcon::DistFromOutside(), TGeoPgon::DistFromOutside(), TGeoHype::DistFromOutside(), TGeoCtub::DistFromOutside(), TGeoTube::DistFromOutsideS(), TGeoCone::DistFromOutsideS(), TGeoTubeSeg::DistFromOutsideS(), TGeoConeSeg::DistFromOutsideS(), TGeoCone::DistToCone(), TGeoConeSeg::DistToCons(), TGeoSphere::DistToSphere(), TCreatePrimitives::Ellipse(), RooBukinPdf::evaluate(), TEllipse::ExecuteEvent(), TDataSetManagerAliEn::ExpandRunSpec(), RooAddPdf::expectedEvents(), TGeoShape::FillBuffer3D(), TPainter3dAlgorithms::FindVisibleDraw(), Roo2DKeysPdf::g(), ROOT::Fit::FitResult::GetConfidenceIntervals(), TF1::GetQuantiles(), TF1::GetRandom(), gsl_poly_complex_solve_cubic(), handle_file_request(), TColorWheel::InCircles(), TGeoSphere::IsOnBoundary(), TGeoSphere::IsPointInside(), main(), TEveCalo2DGL::MakeRhoZCell(), TEveCalo2DGL::MakeRPhiCell(), TGWin32::MapRaised(), TPainter3dAlgorithms::ModifyScreen(), ROOT::Minuit2::GaussRandomGen::operator()(), ROOT::Math::operator*(), TView3D::PadRange(), TEllipse::PaintEllipse(), MainWindow::paintEvent(), piRandom(), TUnfoldSys::PrepareUncorrEmat(), THistPainter::ProjectAitoff2xy(), put_file(), ROOT::Math::AxisAngle::Rectify(), TEveCalo3DGL::RenderBarrelCell(), TEveCalo3DGL::RenderGridEndCap(), TGeoPgon::Rpg(), TGeoSphere::Safety(), TGeoShape::SafetySeg(), TSpectrum3::SearchFast(), TSpectrum3::SearchHighRes(), TGeoEltu::SetPoints(), TEllipse::SetR2(), THelix::SetRange(), TRandom1::SetSeed2(), TRadialGradient::SetStartEndR1R2(), TSpectrumFit::Shape(), TRandom::Sphere(), ROOT::Math::RandomFunctionsImpl< TRandomEngine >::Sphere(), TEllipse::TEllipse(), test17(), test_smatrix_op(), test_tmatrix_op(), testGauss(), testIntegration(), testIO(), testQuasiRandom(), testRotations3D(), testUniform(), unuranSimple(), RooAddModel::updateCoefficients(), and RooAddPdf::updateCoefficients().

unsigned int r3[N_CITIES]
double second_E

Definition at line 325 of file simanTSP.cxx.

Referenced by do_all_perms().

bool showGraphics = false

Definition at line 27 of file simanTSP.cxx.

Referenced by main(), and simanTSP().

double third_E

Definition at line 325 of file simanTSP.cxx.