Skip to content

Commit

Permalink
data_analysis.cpp without #include <unistd.h>, with #include <physyco…
Browse files Browse the repository at this point in the history
…m/histo.hpp>

data_reading.cpp with a warning in load_poly that make things work. If I use other specification, as suggested by the compiler the code breaks at reading, not being able to access
initialize poly[n].poly_cid with poly_id.
config.cpp with .contains instead of .has_member
  • Loading branch information
albertoamaduzzi committed Apr 18, 2024
1 parent ad7cd8b commit 5d2377c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion source/data_analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ presence: filled*/
}
out_stats.close();
}
dump_coords_traj(config_, traj);
}
//-------------------------------------------------------------------------------------------------
// SEED //
Expand Down
3 changes: 2 additions & 1 deletion source/data_reading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void load_poly(config config_,std::vector<poly_base> &poly,std::map<unsigned lon

int n = 0;
// front tail VS start end
while (fscanf(fp0, " %llu %llu %llu %f %d %d %d %d %lf %d %s",
while (fscanf(fp0, " %lld %lld %lld %f %f %d %d %d %lf %d %s",
&id_poly, &cid_Fjnct, &cid_Tjnct, &meters, &frc, &n2c, &fow, &oneway, &kmh, &lanes, name) != EOF)
{
n++;
Expand All @@ -88,6 +88,7 @@ void load_poly(config config_,std::vector<poly_base> &poly,std::map<unsigned lon
// std::cout << "size_of id poly: " << sizeof(id_poly) << " size_of cid_Fjnct: " << sizeof(cid_Fjnct) << " size_of cid_Tjnct: " << sizeof(cid_Tjnct) << std::endl;
std::cout << "meters: " << meters << " frc: " << frc << " n2c: " << n2c << " fow: " << fow << " oneway: " << oneway << " kmh: " << kmh << " lanes: " << lanes << " name: " << name<<std::endl;
std::cout << "size_of meters: " << sizeof(meters) << " size_of frc: " << sizeof(frc) << " size_of n2c: " << sizeof(n2c) << " size_of fow: " << sizeof(fow) << " size_of oneway: " << sizeof(oneway) << " size_of kmh: " << sizeof(kmh) << " size_of lanes: " << sizeof(lanes) << " size_of name: " << sizeof(name) << std::endl;
if (n==5) exit(5);
if (poly[n].cid_poly == id_poly)
{
// inizializzo gli altri parametri di poly_base tramite il riconoscimento del numero della poly id di .pnt.
Expand Down

0 comments on commit 5d2377c

Please sign in to comment.