KNF Darstellung im KV diagramm
Verpnüfung und vergleich mit KNF wurde hinzugefügt.
This commit is contained in:
parent
d17de2a6a1
commit
17c246a3cc
8 changed files with 18 additions and 34 deletions
|
@ -28,7 +28,7 @@
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseOfMfc>Static</UseOfMfc>
|
<UseOfMfc>Static</UseOfMfc>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v100</PlatformToolset>
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
|
3
GDE_3_2008/res/input8-KNF.txt
Normal file
3
GDE_3_2008/res/input8-KNF.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Variables: a, b, c, d , e , f, g, h
|
||||||
|
Terms:
|
||||||
|
"xx01xx01">0
|
3
GDE_3_2008/res/input8.txt
Normal file
3
GDE_3_2008/res/input8.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Variables: a, b, c, d , e , f, g, h
|
||||||
|
Terms:
|
||||||
|
"xx01xx01">1
|
|
@ -1,26 +0,0 @@
|
||||||
1 Variables: a,Variable a
|
|
||||||
bar,Variable bar
|
|
||||||
char,Variable char
|
|
||||||
d
|
|
||||||
Variable d
|
|
||||||
2 Terms:
|
|
||||||
|
|
||||||
3 "0010"Term Key 0010
|
|
||||||
>1
|
|
||||||
Term Value 1
|
|
||||||
|
|
||||||
4 7>Term Key 7
|
|
||||||
1
|
|
||||||
Term Value 1
|
|
||||||
|
|
||||||
5 14>Term Key 14
|
|
||||||
1
|
|
||||||
Term Value 1
|
|
||||||
|
|
||||||
6 "01xx"Term Key 01xx
|
|
||||||
>1
|
|
||||||
Term Value 1
|
|
||||||
|
|
||||||
7 "x000"Term Key x000
|
|
||||||
>1Term Value 1
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
extern uint dimension;
|
extern uint dimension;
|
||||||
|
extern bool KNF;
|
||||||
|
|
||||||
void Cell::refresh(PrimImplikantCollection* &globalPIC)
|
void Cell::refresh(PrimImplikantCollection* &globalPIC)
|
||||||
{
|
{
|
||||||
|
@ -34,10 +35,12 @@ vector<Cell*>* Cell::getHazards(vector<Cell*> &allCells)
|
||||||
|
|
||||||
for (vector<Cell*>::iterator neighbor = neighbors->begin(); neighbor < neighbors->end(); neighbor++)
|
for (vector<Cell*>::iterator neighbor = neighbors->begin(); neighbor < neighbors->end(); neighbor++)
|
||||||
{
|
{
|
||||||
if ((*neighbor)->value == false)
|
|
||||||
continue;
|
if ((*neighbor)->value == KNF)
|
||||||
if ((*neighbor)->hasOneOfThose(this->primImplikanten) == false)
|
continue;
|
||||||
hazardous->push_back(*neighbor);
|
if ((*neighbor)->hasOneOfThose(this->primImplikanten) == false)
|
||||||
|
hazardous->push_back(*neighbor);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete neighbors;
|
delete neighbors;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "PrimImplikantCollection.h"
|
#include "PrimImplikantCollection.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
extern bool KNF;
|
||||||
|
|
||||||
#ifndef CELL
|
#ifndef CELL
|
||||||
#define CELL
|
#define CELL
|
||||||
|
@ -21,7 +22,7 @@ public:
|
||||||
{
|
{
|
||||||
this->index = index;
|
this->index = index;
|
||||||
this->refresh(globalPIC);
|
this->refresh(globalPIC);
|
||||||
this->value = this->primImplikanten.size() > 0;
|
this->value = (this->primImplikanten.size() > 0) ^ KNF;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrimImplikantCollection primImplikanten;
|
PrimImplikantCollection primImplikanten;
|
||||||
|
|
|
@ -30,7 +30,7 @@ void CellCollection::findHazards()
|
||||||
uint I = i ^ (i/2); // transform to gray code --> Schachbrettmuster
|
uint I = i ^ (i/2); // transform to gray code --> Schachbrettmuster
|
||||||
Cell* currentCell = cells[I]; // this is the cell we are currently checking
|
Cell* currentCell = cells[I]; // this is the cell we are currently checking
|
||||||
|
|
||||||
if (currentCell->value == false) // no hazard can occur
|
if (currentCell->value == KNF) // no hazard can occur
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
cout << " Checking cell " << I << endl;
|
cout << " Checking cell " << I << endl;
|
||||||
|
|
|
@ -28,7 +28,7 @@ uint Tools::GrayToBinary(uint x)
|
||||||
char r = 0; // r = ceil(ld(x))
|
char r = 0; // r = ceil(ld(x))
|
||||||
do
|
do
|
||||||
r++;
|
r++;
|
||||||
while (x1 >>= 1);
|
while (x1 >>= 1); // x1=x1>>1
|
||||||
|
|
||||||
if ((r & (r-1)) != 0) // keine Potenz von 2
|
if ((r & (r-1)) != 0) // keine Potenz von 2
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue