mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-05 07:41:11 +00:00
voz1b1_2 compiles and links now.
This commit is contained in:
parent
51efae2e09
commit
26132586c0
3 changed files with 72 additions and 52 deletions
|
@ -1,3 +1,4 @@
|
|||
#include <limits>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "voz_io.hpp"
|
||||
|
@ -12,15 +13,15 @@ bool PositionData::readFrom(const string& fname)
|
|||
try
|
||||
{
|
||||
UnformattedRead f(fname.c_str());
|
||||
|
||||
|
||||
f.beginCheckpoint();
|
||||
np = f.readInt32();
|
||||
f.endCheckPoint();
|
||||
f.endCheckpoint();
|
||||
|
||||
for (int j = 0; j < 3; j++)
|
||||
{
|
||||
xyz[j] = new float[np];
|
||||
|
||||
|
||||
f.beginCheckpoint();
|
||||
for (int p = 0; p < np; p++)
|
||||
xyz[j][p] = f.readReal32();
|
||||
|
@ -39,7 +40,7 @@ bool PositionData::readFrom(const string& fname)
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -49,13 +50,13 @@ void PositionData::findExtrema()
|
|||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
xyz_min[i] = BF;
|
||||
xyz_min[i] = BF;
|
||||
xyz_max[i] = -BF;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
for (pid_t p = 0; p < np; p++)
|
||||
for (pid_t p = 0; p < np; p++)
|
||||
{
|
||||
xyz_min[p] = min(xyz_min[p], xyz[p][i]);
|
||||
xyz_max[p] = max(xyz_max[p], xyz[p][i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue