Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Emmanuel Hebrard
Blossom
Commits
fa9e271d
Commit
fa9e271d
authored
Feb 14, 2021
by
ehebrard
Browse files
ttt
parent
196d5a9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
code/blossom/__main__.py
View file @
fa9e271d
...
...
@@ -4,9 +4,8 @@ import blossom
opt
=
blossom
.
parse
(
bfs
.
to_str_vec
(
sys
.
argv
))
filename
=
str
(
opt
.
instance_file
)
wood
=
blossom
.
Wood
()
#
wood = blossom.Wood
I
()
dataset
=
blossom
.
WeightedDataset
()
algo
=
blossom
.
BacktrackingAlgo
(
wood
,
opt
)
if
filename
==
""
:
print
(
"No input file!"
)
...
...
@@ -15,7 +14,10 @@ else:
blossom
.
read_binary
(
dataset
,
opt
)
dataset
.
preprocess
()
dataset
.
setup
(
algo
)
algo
=
blossom
.
BacktrackingAlgo
(
datset
,
opt
)
# dataset.setup(algo)
algo
.
minimize_error
()
tree
=
algo
.
getSolution
()
...
...
code/blossom/wrapper/swig/blossom.i
View file @
fa9e271d
...
...
@@ -175,11 +175,11 @@ namespace blossom {
/* void addBitsetExample(const dynamic_bitset<> &sample, const bool y, const size_t weight);*/
}
;
%
template
(
WoodI
)
Wood
<
int
>
;
/*
%template(WoodI) Wood<int>;
%template(WoodD) Wood<double>;
%template(TreeI) Tree<int>;
%
template
(
TreeD
)
Tree
<
double
>
;
%template(TreeD) Tree<double>;
*/
%
template
(
WeightedDatasetI
)
WeightedDataset
<
int
>
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment