Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
old_macaon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Franck Dary
old_macaon
Commits
49fe7283
Commit
49fe7283
authored
5 years ago
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
Changed the way l_rules are computed
parent
c43918ed
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
maca_common/src/macaon_compute_l_rules.cpp
+23
-4
23 additions, 4 deletions
maca_common/src/macaon_compute_l_rules.cpp
with
23 additions
and
4 deletions
maca_common/src/macaon_compute_l_rules.cpp
+
23
−
4
View file @
49fe7283
...
@@ -150,6 +150,8 @@ int main(int argc, char * argv[])
...
@@ -150,6 +150,8 @@ int main(int argc, char * argv[])
char
buffer
[
100000
];
char
buffer
[
100000
];
std
::
map
<
std
::
string
,
std
::
vector
<
FPLM
>
>
rules
;
std
::
map
<
std
::
string
,
std
::
vector
<
FPLM
>
>
rules
;
std
::
map
<
std
::
string
,
std
::
vector
<
FPLM
>
>
acceptedRules
;
while
(
fscanf
(
fplm
.
getDescriptor
(),
"%[^
\n
]
\n
"
,
buffer
)
==
1
)
while
(
fscanf
(
fplm
.
getDescriptor
(),
"%[^
\n
]
\n
"
,
buffer
)
==
1
)
{
{
auto
splited
=
util
::
split
(
buffer
,
'\t'
);
auto
splited
=
util
::
split
(
buffer
,
'\t'
);
...
@@ -180,7 +182,7 @@ int main(int argc, char * argv[])
...
@@ -180,7 +182,7 @@ int main(int argc, char * argv[])
{
{
if
((
int
)
it
.
second
.
size
()
>=
threshold
)
if
((
int
)
it
.
second
.
size
()
>=
threshold
)
{
{
fprintf
(
rulesFile
.
getDescriptor
(),
"%s
\n
"
,
it
.
first
.
c_str
())
;
acceptedRules
[
it
.
first
]
=
it
.
second
;
for
(
auto
&
fplm
:
it
.
second
)
for
(
auto
&
fplm
:
it
.
second
)
fpInRules
[
fplm
.
getFp
()]
=
true
;
fpInRules
[
fplm
.
getFp
()]
=
true
;
}
}
...
@@ -189,11 +191,11 @@ int main(int argc, char * argv[])
...
@@ -189,11 +191,11 @@ int main(int argc, char * argv[])
exceptions
[
line
.
getFp
()].
emplace_back
(
line
);
exceptions
[
line
.
getFp
()].
emplace_back
(
line
);
}
}
for
(
auto
&
it
:
acceptedRules
)
fprintf
(
rulesFile
.
getDescriptor
(),
"%s
\n
"
,
it
.
first
.
c_str
());
for
(
auto
it
:
exceptions
)
for
(
auto
it
:
exceptions
)
{
{
if
(
fpInRules
.
count
(
it
.
first
))
continue
;
int
indexMax
=
0
;
int
indexMax
=
0
;
int
knownMax
=
0
;
int
knownMax
=
0
;
...
@@ -204,6 +206,23 @@ int main(int argc, char * argv[])
...
@@ -204,6 +206,23 @@ int main(int argc, char * argv[])
knownMax
=
it
.
second
[
i
].
getNbKnown
();
knownMax
=
it
.
second
[
i
].
getNbKnown
();
}
}
if
(
fpInRules
.
count
(
it
.
first
))
{
int
otherIndexMax
=
0
;
int
otherKnownMax
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
acceptedRules
[
it
.
first
].
size
();
i
++
)
if
(
acceptedRules
[
it
.
first
][
i
].
getNbKnown
()
>
otherKnownMax
)
{
otherIndexMax
=
i
;
otherKnownMax
=
acceptedRules
[
it
.
first
][
i
].
getNbKnown
();
}
if
(
otherKnownMax
>=
knownMax
)
continue
;
}
exceptionsToPrint
.
emplace_back
(
it
.
second
[
indexMax
].
toString
());
exceptionsToPrint
.
emplace_back
(
it
.
second
[
indexMax
].
toString
());
}
}
...
...
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