text.cc (5581:5e1863e9afa2) text.cc (5598:345ef3bda3d2)
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;

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

442 print.value = underflow;
443 if (!compat && total) {
444 print.pdf = underflow / total;
445 print.cdf += print.pdf;
446 }
447 print(stream);
448 }
449
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;

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

442 print.value = underflow;
443 if (!compat && total) {
444 print.pdf = underflow / total;
445 print.cdf += print.pdf;
446 }
447 print(stream);
448 }
449
450
451 if (!compat) {
452 for (int i = 0; i < size; ++i) {
453 stringstream namestr;
454 namestr << name;
455
456 Counter low = i * bucket_size + min;
457 Counter high = ::min(low + bucket_size, max);
458 namestr << low;
459 if (low < high)
460 namestr << "-" << high;
461
462 print.name = namestr.str();
463 print.value = vec[i];
464 if (total) {
465 print.pdf = vec[i] / total;
466 print.cdf += print.pdf;
467 }
468 print(stream);
469 }
450 if (!compat) {
451 for (int i = 0; i < size; ++i) {
452 stringstream namestr;
453 namestr << name;
454
455 Counter low = i * bucket_size + min;
456 Counter high = ::min(low + bucket_size, max);
457 namestr << low;
458 if (low < high)
459 namestr << "-" << high;
460
461 print.name = namestr.str();
462 print.value = vec[i];
463 if (total) {
464 print.pdf = vec[i] / total;
465 print.cdf += print.pdf;
466 }
467 print(stream);
468 }
470
471 } else {
472 Counter _min;
473 Result _pdf;
474 Result _cdf = 0.0;
475
476 print.flags = flags | __substat;
477
478 for (int i = 0; i < size; ++i) {

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

628 Result total = 0.0;
629 for (int j = 0; j < data.y; ++j) {
630 yvec[j] = data.cvec[iy + j];
631 tot_vec[j] += yvec[j];
632 total += yvec[j];
633 super_total += yvec[j];
634 }
635
469 } else {
470 Counter _min;
471 Result _pdf;
472 Result _cdf = 0.0;
473
474 print.flags = flags | __substat;
475
476 for (int i = 0; i < size; ++i) {

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

626 Result total = 0.0;
627 for (int j = 0; j < data.y; ++j) {
628 yvec[j] = data.cvec[iy + j];
629 tot_vec[j] += yvec[j];
630 total += yvec[j];
631 super_total += yvec[j];
632 }
633
636 print.name = data.name + "_" + (havesub ? data.subnames[i] : to_string(i));
634 print.name = data.name + "_" +
635 (havesub ? data.subnames[i] : to_string(i));
637 print.desc = data.desc;
638 print.vec = yvec;
639 print.total = total;
640 print(*stream);
641 }
642
643 if ((data.flags & ::Stats::total) && (data.x > 1)) {
644 print.name = data.name;

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

688Text::visit(const VectorDistData &data)
689{
690 if (noOutput(data))
691 return;
692
693 for (int i = 0; i < data.size(); ++i) {
694 DistPrint print;
695
636 print.desc = data.desc;
637 print.vec = yvec;
638 print.total = total;
639 print(*stream);
640 }
641
642 if ((data.flags & ::Stats::total) && (data.x > 1)) {
643 print.name = data.name;

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

687Text::visit(const VectorDistData &data)
688{
689 if (noOutput(data))
690 return;
691
692 for (int i = 0; i < data.size(); ++i) {
693 DistPrint print;
694
696 print.name = data.name +
697 (data.subnames[i].empty() ? ("_" + to_string(i)) : data.subnames[i]);
695 print.name = data.name + "_" +
696 (data.subnames[i].empty() ? (to_string(i)) : data.subnames[i]);
698 print.desc = data.subdescs[i].empty() ? data.desc : data.subdescs[i];
699 print.flags = data.flags;
700 print.compat = compat;
701 print.descriptions = descriptions;
702 print.precision = data.precision;
703
704 print.min_val = data.data[i].min_val;
705 print.max_val = data.data[i].max_val;

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

743 text.descriptions = desc;
744 text.compat = compat;
745 OutputList.push_back(&text);
746 connected = true;
747
748 return true;
749}
750
697 print.desc = data.subdescs[i].empty() ? data.desc : data.subdescs[i];
698 print.flags = data.flags;
699 print.compat = compat;
700 print.descriptions = descriptions;
701 print.precision = data.precision;
702
703 print.min_val = data.data[i].min_val;
704 print.max_val = data.data[i].max_val;

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

742 text.descriptions = desc;
743 text.compat = compat;
744 OutputList.push_back(&text);
745 connected = true;
746
747 return true;
748}
749
751
752/* namespace Stats */ }
750/* namespace Stats */ }