Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MascotSDS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kaushik Mallik
MascotSDS
Commits
91768b70
Commit
91768b70
authored
3 years ago
by
Kaushik Mallik
Browse files
Options
Downloads
Patches
Plain Diff
Bugfixes: Incorrect decimal to binary conversion at several places
parent
a86806be
No related branches found
No related tags found
1 merge request
!3
WIP: Universal bdds representation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/SymbolicSet.hh
+10
-9
10 additions, 9 deletions
lib/SymbolicSet.hh
with
10 additions
and
9 deletions
lib/SymbolicSet.hh
+
10
−
9
View file @
91768b70
...
@@ -416,14 +416,13 @@ namespace mascot {
...
@@ -416,14 +416,13 @@ namespace mascot {
/* combute UBDD representation of x */
/* combute UBDD representation of x */
UBDD
cube
=
base_
.
one
();
UBDD
cube
=
base_
.
one
();
for
(
size_t
i
=
0
;
i
<
dim_
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
dim_
;
i
++
)
{
std
::
vector
<
uint8_t
>
phase
(
nofBddVars_
[
i
]);
std
::
vector
<
uint8_t
>
phase
(
nofBddVars_
[
i
]
,
0
);
std
::
vector
<
UBDD
>
vars
(
nofBddVars_
[
i
]);
std
::
vector
<
UBDD
>
vars
(
nofBddVars_
[
i
]);
int
idx
=
std
::
lround
((
x
[
i
]
-
firstGridPoint_
[
i
])
/
eta_
[
i
]);
for
(
size_t
j
=
0
;
j
<
nofBddVars_
[
i
];
j
++
)
{
for
(
size_t
j
=
0
;
j
<
nofBddVars_
[
i
];
j
++
)
{
phase
[
j
]
=
idx
%
2
;
idx
/=
2
;
vars
[
j
]
=
base_
.
var
(
indBddVars_
[
i
][
j
]);
vars
[
j
]
=
base_
.
var
(
indBddVars_
[
i
][
j
]);
}
}
int
idx
=
std
::
lround
((
x
[
i
]
-
firstGridPoint_
[
i
])
/
eta_
[
i
]);
for
(
size_t
j
=
0
;
idx
;
idx
/=
2
,
j
++
)
phase
[
j
]
=
0
+
idx
%
2
;
cube
&=
base_
.
cube
(
vars
,
phase
);
cube
&=
base_
.
cube
(
vars
,
phase
);
}
}
return
cube
;
return
cube
;
...
@@ -1039,14 +1038,16 @@ namespace mascot {
...
@@ -1039,14 +1038,16 @@ namespace mascot {
/* combute UBDD representation of x */
/* combute UBDD representation of x */
UBDD
cube
=
base_
.
one
();
UBDD
cube
=
base_
.
one
();
for
(
size_t
i
=
0
;
i
<
dim_
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
dim_
;
i
++
)
{
std
::
vector
<
uint8_t
>
phase
(
nofBddVars_
[
i
]);
std
::
vector
<
uint8_t
>
phase
(
nofBddVars_
[
i
]
,
0
);
std
::
vector
<
UBDD
>
vars
(
nofBddVars_
[
i
]);
std
::
vector
<
UBDD
>
vars
(
nofBddVars_
[
i
]);
int
idx
=
std
::
lround
((
x
[
i
]
-
firstGridPoint_
[
i
])
/
eta_
[
i
]);
for
(
size_t
j
=
0
;
j
<
nofBddVars_
[
i
];
j
++
)
{
for
(
size_t
j
=
0
;
j
<
nofBddVars_
[
i
];
j
++
)
{
phase
[
j
]
=
idx
%
2
;
idx
/=
2
;
vars
[
j
]
=
base_
.
var
(
indBddVars_
[
i
][
j
]);
vars
[
j
]
=
base_
.
var
(
indBddVars_
[
i
][
j
]);
}
}
int
idx
=
std
::
lround
((
x
[
i
]
-
firstGridPoint_
[
i
])
/
eta_
[
i
]);
for
(
size_t
j
=
0
;
idx
;
idx
/=
2
)
{
phase
[
j
]
=
0
+
idx
%
2
;
j
++
;
}
cube
&=
base_
.
cube
(
vars
,
phase
);
cube
&=
base_
.
cube
(
vars
,
phase
);
}
}
/* check if cube is element of symbolicSet_ */
/* check if cube is element of symbolicSet_ */
...
@@ -1276,7 +1277,7 @@ namespace mascot {
...
@@ -1276,7 +1277,7 @@ namespace mascot {
std
::
vector
<
int
>
phase
(
nofBddVars_
[
i
],
0
);
std
::
vector
<
int
>
phase
(
nofBddVars_
[
i
],
0
);
for
(
size_t
j
=
0
;
j
<
nofGridPoints_
[
i
];
j
++
)
{
for
(
size_t
j
=
0
;
j
<
nofGridPoints_
[
i
];
j
++
)
{
int
x
=
j
;
int
x
=
j
;
for
(
int
i
=
0
;
x
;
x
/=
2
,
i
++
)
phase
[
i
]
=
x
%
2
;
for
(
int
k
=
0
;
x
;
x
/=
2
,
k
++
)
phase
[
k
]
=
x
%
2
;
symset
[
i
]
+=
base_
.
cube
(
ubddVars
[
i
],
phase
);
symset
[
i
]
+=
base_
.
cube
(
ubddVars
[
i
],
phase
);
}
}
grid
&=
symset
[
i
];
grid
&=
symset
[
i
];
...
...
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