text.cc (7811:a8fc35183c10) text.cc (7831:c1e158414648)
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 363 unchanged lines hidden (view full) ---

372 print(stream);
373
374 if (data.type == Deviation)
375 return;
376
377 size_t size = data.cvec.size();
378
379 Result total = 0.0;
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 363 unchanged lines hidden (view full) ---

372 print(stream);
373
374 if (data.type == Deviation)
375 return;
376
377 size_t size = data.cvec.size();
378
379 Result total = 0.0;
380 if (data.underflow != NAN)
380 if (data.type == Dist && data.underflow != NAN)
381 total += data.underflow;
382 for (off_type i = 0; i < size; ++i)
383 total += data.cvec[i];
381 total += data.underflow;
382 for (off_type i = 0; i < size; ++i)
383 total += data.cvec[i];
384 if (data.overflow != NAN)
384 if (data.type == Dist && data.overflow != NAN)
385 total += data.overflow;
386
387 if (total) {
388 print.pdf = 0.0;
389 print.cdf = 0.0;
390 }
391
385 total += data.overflow;
386
387 if (total) {
388 print.pdf = 0.0;
389 print.cdf = 0.0;
390 }
391
392 if (data.underflow != NAN) {
392 if (data.type == Dist && data.underflow != NAN) {
393 print.name = base + "underflows";
394 print.update(data.underflow, total);
395 print(stream);
396 }
397
398 for (off_type i = 0; i < size; ++i) {
399 stringstream namestr;
400 namestr << base;

--- 4 unchanged lines hidden (view full) ---

405 if (low < high)
406 namestr << "-" << high;
407
408 print.name = namestr.str();
409 print.update(data.cvec[i], total);
410 print(stream);
411 }
412
393 print.name = base + "underflows";
394 print.update(data.underflow, total);
395 print(stream);
396 }
397
398 for (off_type i = 0; i < size; ++i) {
399 stringstream namestr;
400 namestr << base;

--- 4 unchanged lines hidden (view full) ---

405 if (low < high)
406 namestr << "-" << high;
407
408 print.name = namestr.str();
409 print.update(data.cvec[i], total);
410 print(stream);
411 }
412
413 if (data.overflow != NAN) {
413 if (data.type == Dist && data.overflow != NAN) {
414 print.name = base + "overflows";
415 print.update(data.overflow, total);
416 print(stream);
417 }
418
419 print.pdf = NAN;
420 print.cdf = NAN;
421
414 print.name = base + "overflows";
415 print.update(data.overflow, total);
416 print(stream);
417 }
418
419 print.pdf = NAN;
420 print.cdf = NAN;
421
422 if (data.min_val != NAN) {
422 if (data.type == Dist && data.min_val != NAN) {
423 print.name = base + "min_value";
424 print.value = data.min_val;
425 print(stream);
426 }
427
423 print.name = base + "min_value";
424 print.value = data.min_val;
425 print(stream);
426 }
427
428 if (data.max_val != NAN) {
428 if (data.type == Dist && data.max_val != NAN) {
429 print.name = base + "max_value";
430 print.value = data.max_val;
431 print(stream);
432 }
433
434 print.name = base + "total";
435 print.value = total;
436 print(stream);

--- 161 unchanged lines hidden ---
429 print.name = base + "max_value";
430 print.value = data.max_val;
431 print(stream);
432 }
433
434 print.name = base + "total";
435 print.value = total;
436 print(stream);

--- 161 unchanged lines hidden ---