Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sogMBT
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PMC-SOG
sogMBT
Commits
f9f97e29
Commit
f9f97e29
authored
2 months ago
by
Jaime Arias
Browse files
Options
Downloads
Patches
Plain Diff
refactor: remove unused methods and types
parent
41ea1365
No related branches found
Branches containing commit
No related tags found
1 merge request
!3
Full refactoring applying some conventions
Pipeline
#9209
passed with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/RdPBDD.cpp
+9
-9
9 additions, 9 deletions
src/RdPBDD.cpp
src/RdPBDD.hpp
+14
-23
14 additions, 23 deletions
src/RdPBDD.hpp
src/modular_sog.cpp
+0
-1
0 additions, 1 deletion
src/modular_sog.cpp
with
23 additions
and
33 deletions
src/RdPBDD.cpp
+
9
−
9
View file @
f9f97e29
/* -*- 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
),
P
recond
(
pre
),
P
ostcond
(
post
),
rel
(
r
),
prerel
(
pr
)
{}
:
var
(
v
),
pair
(
p
),
p
recond
(
pre
),
p
ostcond
(
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
).
P
recond
);
Mt
=
Mt
&
!
((
*
i
).
p
recond
);
}
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
].
P
recond
);
res
=
res
|
(
From
&
relation
[
*
i
].
p
recond
);
return
res
;
}
/*-----------FrontiereNodes1() pour bdd ---------*/
bdd
RdPBDD
::
FrontiereNodes1
(
bdd
From
,
int
t
)
{
bdd
res
=
bddfalse
;
res
=
res
|
(
From
&
relation
[
t
].
P
recond
);
res
=
res
|
(
From
&
relation
[
t
].
p
recond
);
return
res
;
}
/*-------- Produit synchronis� � la vol�e de n graphes d'observation :
...
...
This diff is collapsed.
Click to expand it.
src/RdPBDD.hpp
+
14
−
23
View file @
f9f97e29
/* -*- 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
&
P
recond
,
const
bdd
&
P
ostcond
);
const
bdd
&
p
recond
,
const
bdd
&
p
ostcond
);
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
P
recond
;
bdd
P
ostcond
;
bdd
p
recond
;
bdd
p
ostcond
;
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_
This diff is collapsed.
Click to expand it.
src/modular_sog.cpp
+
0
−
1
View file @
f9f97e29
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment