Ejemplo n.º 1
0
static void Print_stats( int exit_code )
{
  float through_put = 0.0;

  if( Volume_duration > 0.0 )
  {
    through_put = ( ((float) Total_size / BYTES_PER_KILOBYTE ) * BITS_PER_BYTE ) / Volume_duration;
  }

  if( Volume_end_epoch == EPOCH_INIT && exit_code == EXIT_SUCCESS )
  {
    exit_code = NO_END_OF_VOLUME_FOUND;
  }

  if( Space_output == NO )
  {
    /* For non-spaced, csv format */
    P_out( "%s,%ld,%ld,%d,%d,%d,%d,%d,%d,%d,%f,%d,%f", ICAO_buf, Volume_start_epoch, Volume_end_epoch, VCP, DP_flag, Volume_duration, Number_of_elevations, Number_of_radials, Compressed_bytes, Uncompressed_bytes, Compression_ratio, Total_size, through_put );
  }
  else
  {
    /* For spaced, csv format */
    P_out( "%4s,%10ld,%10ld,%3d,%1d,%3d,%2d,%5d,%8d,%8d,%6.2f,%8d,%6.2f", ICAO_buf, Volume_start_epoch, Volume_end_epoch, VCP, DP_flag, Volume_duration, Number_of_elevations, Number_of_radials, Compressed_bytes, Uncompressed_bytes, Compression_ratio, Total_size, through_put );
  } 

  exit( exit_code );
}
Ejemplo n.º 2
0
TEST(PointInsideComponent, near_corner) {
    Eigen::MatrixXd V1;
    Eigen::MatrixXi F1;
    test_common::load_mesh("cube.obj", V1, F1);

    const double EPS = std::numeric_limits<double>::epsilon();
    Eigen::MatrixXd P_out(8, 3);
    P_out << 0.5 + EPS, 0.5 + EPS, 0.5 + EPS,
            -0.5 - EPS, 0.5 + EPS, 0.5 + EPS,
             0.5 + EPS,-0.5 - EPS, 0.5 + EPS,
            -0.5 - EPS,-0.5 - EPS, 0.5 + EPS,
             0.5 + EPS, 0.5 + EPS,-0.5 - EPS,
            -0.5 - EPS, 0.5 + EPS,-0.5 - EPS,
             0.5 + EPS,-0.5 - EPS,-0.5 - EPS,
            -0.5 - EPS,-0.5 - EPS,-0.5 - EPS;

    Eigen::VectorXi inside;
    EXPECT_NO_THROW(igl::copyleft::cgal::points_inside_component(V1, F1, P_out, inside));
    ASSERT_TRUE((inside.array()==0).all());

    Eigen::MatrixXd P_in(8, 3);
    P_in << 0.5 - EPS, 0.5 - EPS, 0.5 - EPS,
           -0.5 + EPS, 0.5 - EPS, 0.5 - EPS,
            0.5 - EPS,-0.5 + EPS, 0.5 - EPS,
           -0.5 + EPS,-0.5 + EPS, 0.5 - EPS,
            0.5 - EPS, 0.5 - EPS,-0.5 + EPS,
           -0.5 + EPS, 0.5 - EPS,-0.5 + EPS,
            0.5 - EPS,-0.5 + EPS,-0.5 + EPS,
           -0.5 + EPS,-0.5 + EPS,-0.5 + EPS;
    EXPECT_NO_THROW(igl::copyleft::cgal::points_inside_component(V1, F1, P_in, inside));
    ASSERT_TRUE((inside.array()==1).all());
}