Ausgabe der Zeile als Dezimalzahl
This commit is contained in:
parent
8ed80f3d68
commit
100f4224cf
1 changed files with 10 additions and 7 deletions
|
@ -2,6 +2,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <iomanip>
|
||||||
#include "Cell.h"
|
#include "Cell.h"
|
||||||
#include "PrimImplikant.h"
|
#include "PrimImplikant.h"
|
||||||
#include "Wertetabelle.h"
|
#include "Wertetabelle.h"
|
||||||
|
@ -17,7 +18,9 @@ void Wertetabelle::Print()
|
||||||
|
|
||||||
for (uint i = 0; i < numElements; i++)
|
for (uint i = 0; i < numElements; i++)
|
||||||
{
|
{
|
||||||
cout << "|"; // => |
|
cout << "| "; // => |
|
||||||
|
cout << setfill(' ') << setw(ceil(log10((float)numElements))) << i; // => 4
|
||||||
|
cout << " |"; // => |
|
||||||
this->printI(i); // => 0 1 0 0
|
this->printI(i); // => 0 1 0 0
|
||||||
cout << "| "; // => |
|
cout << "| "; // => |
|
||||||
cout << (*this->cells)[i]->value; // => 1
|
cout << (*this->cells)[i]->value; // => 1
|
||||||
|
@ -37,7 +40,7 @@ string Wertetabelle::makeHeader()
|
||||||
{
|
{
|
||||||
bool setPad = padding.size() == 0;
|
bool setPad = padding.size() == 0;
|
||||||
|
|
||||||
string row2 = "|";
|
string row2 = "|" + string(ceil(log10((float)numElements)) + 2, ' ') + "|";
|
||||||
for (vector<string>::iterator v = variables->begin(); v < variables->end(); v++)
|
for (vector<string>::iterator v = variables->begin(); v < variables->end(); v++)
|
||||||
{
|
{
|
||||||
row2 += " " + *v;
|
row2 += " " + *v;
|
||||||
|
|
Loading…
Reference in a new issue