1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
// -------------------------------------------------------------------
// MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
//
// See the Copyright.txt and License.txt files for license information.
// You should have received a copy of these files along with MAdLib.
// If not, see <http://www.madlib.be/license/>
//
// Please report all bugs and problems to <contrib@madlib.be>
//
// Authors: Gaetan Compere, Jean-Francois Remacle
// -------------------------------------------------------------------
#include "MAdStatistics.h"
using std::ostream;
namespace MAd {
// -------------------------------------------------------------------
void MAdStatistics::initialize()
{
t_eSplits = 0.;
t_eCollapses = 0.;
t_eSwaps = 0.;
t_rSlivers = 0.;
t_fSlivers = 0.;
num_eSplits = 0;
num_eCollapses = 0;
num_eSwaps = 0;
numInfLoops = 0;
}
// -------------------------------------------------------------------
void MAdStatistics::finalize()
{
}
// -------------------------------------------------------------------
void MAdStatistics::print(ostream& out) const
{
out << "\n*** Statistics about local mesh modifications *** \n\n";
out << "Time spent in the different operators:\n";
double t_Total = t_eSplits + t_eCollapses + t_eSwaps + t_rSlivers + t_fSlivers;
out << "Edge splits\tEdge collapses\tEdge swaps\tSlivers\tTotal\n"
<< t_eSplits <<"\t"<< t_eCollapses <<"\t"<< t_eSwaps <<"\t"
<< t_rSlivers+t_fSlivers <<"\t"<< t_Total <<"\n\n";
out << "Number of elementary operations (excluding sliver handling):\n";
out << "Edge splits\tEdge collapses\tEdge swaps\n"
<< num_eSplits <<"\t"<< num_eCollapses <<"\t"<< num_eSwaps << "\n\n";
out << "Number of infinite loops:\t" << numInfLoops << "\n\n";
}
// -------------------------------------------------------------------
}
|