Skip to content
Snippets Groups Projects
Commit f9f97e29 authored by Jaime Arias's avatar Jaime Arias
Browse files

refactor: remove unused methods and types

parent 41ea1365
No related branches found
No related tags found
1 merge request!3Full refactoring applying some conventions
Pipeline #9209 passed with stage
/* -*- C++ -*- */
#include "RdPBDD.hpp"
#include <iostream>
#include <map>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#include "Net.hpp"
#include "bvec.h"
using namespace std;
#include <math.h>
#include "RdPBDD.hpp"
#include "bvec.h"
int NbIt;
int itext, itint;
int MaxIntBdd;
......@@ -20,6 +19,7 @@ bdd *TabMeta;
int nbmetastate;
double old_size;
const vector<class Place> *vplaces = NULL;
void my_error_handler(int errcode) {
// cout<<"errcode = "<<errcode<<endl;
if (errcode == BDD_RANGE) {
......@@ -45,7 +45,7 @@ void printhandler(ostream &o, int var) {
/*****************************************************************/
Trans::Trans(const bdd &v, bddPair *p, const bdd &r, const bdd &pr,
const bdd &pre, const bdd &post)
: var(v), pair(p), Precond(pre), Postcond(post), rel(r), prerel(pr) {}
: var(v), pair(p), precond(pre), postcond(post), rel(r), prerel(pr) {}
// Franchissement avant
bdd Trans::operator()(const bdd &n) const {
bdd res = bdd_relprod(n, rel, var);
......@@ -921,7 +921,7 @@ bool RdPBDD::Set_Bloc(bdd &S) const {
bdd Mt = bddtrue;
for (vector<Trans>::const_iterator i = relation.begin(); i != relation.end();
i++, k++) {
Mt = Mt & !((*i).Precond);
Mt = Mt & !((*i).precond);
}
return ((S & Mt) != bddfalse);
// BLOCAGE
......@@ -952,13 +952,13 @@ bdd RdPBDD::FrontiereNodes(bdd From) const {
bdd res = bddfalse;
for (Set::const_iterator i = Observable.begin(); !(i == Observable.end());
i++)
res = res | (From & relation[*i].Precond);
res = res | (From & relation[*i].precond);
return res;
}
/*-----------FrontiereNodes1() pour bdd ---------*/
bdd RdPBDD::FrontiereNodes1(bdd From, int t) {
bdd res = bddfalse;
res = res | (From & relation[t].Precond);
res = res | (From & relation[t].precond);
return res;
}
/*-------- Produit synchronis� � la vol�e de n graphes d'observation :
......
/* -*- C++ -*- */
#ifndef RdPBDD_H
#define RdPBDD_H
#ifndef RdPBDD_H_
#define RdPBDD_H_
#include <stack>
#include <vector>
......@@ -9,12 +8,19 @@
#include "modular_class_of_state.hpp"
#include "modular_sog.hpp"
#include "sog.hpp"
/***********************************************/
// type definitions
typedef std::vector<int> chem;
// structures useful for the synchronised product of n observation graphs.
typedef std::pair<ModularClassOfState*, bdd*> Couple;
typedef std::pair<Couple, Set*> StackElt;
typedef std::stack<StackElt> Stack;
class Trans {
public:
Trans(const bdd& var, bddPair* pair, const bdd& rel, const bdd& prerel,
const bdd& Precond, const bdd& Postcond);
const bdd& precond, const bdd& postcond);
bdd operator()(const bdd& op) const;
bdd operator[](const bdd& op) const;
friend class RdPBDD;
......@@ -22,13 +28,11 @@ class Trans {
private:
bdd var;
bddPair* pair;
bdd Precond;
bdd Postcond;
bdd precond;
bdd postcond;
bdd rel;
bdd prerel;
};
typedef set<int> Set;
typedef vector<int> chem;
class RdPBDD {
private:
......@@ -76,18 +80,5 @@ class RdPBDD {
~RdPBDD() {};
};
/*____________Structure utiles aux produit synchronis� g�n�ralis� de n graphes
* d'observations ________*/
typedef pair<ModularClassOfState*, bdd*> Couple;
typedef pair<Couple, Set*> StackElt;
typedef stack<StackElt> Stack;
typedef vector<StackElt> PileInt;
typedef pair<StackElt, PileInt> CanonicRep;
// typedef stack<CanonicRep> STACK;
typedef stack<PileInt> STACK;
int InStack(PileInt, ModularClassOfState*);
bool MemeVecteur(vector<bdd>, vector<bdd>);
bool Inferieur(vector<bdd>, vector<bdd>);
#endif
#endif // RdPBDD_H_
......@@ -62,7 +62,6 @@ void ModularSOG::InsertState(ModularClassOfState *s) {
nb_states++;
}
/*----------------------InitVisit()------------------------*/
void ModularSOG::InitVisit(ModularClassOfState *s, size_t nb) {
if (nb <= nb_states) {
s->visited = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment