Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
alta
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alta
alta
Commits
76a933f6
Commit
76a933f6
authored
Mar 20, 2013
by
Laurent Belcour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working windows version
parent
e6f2c0b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
sources/core/args.h
sources/core/args.h
+3
-3
sources/core/plugins_manager.cpp
sources/core/plugins_manager.cpp
+3
-3
sources/core/rational_function.cpp
sources/core/rational_function.cpp
+4
-4
No files found.
sources/core/args.h
View file @
76a933f6
...
...
@@ -74,14 +74,14 @@ class arguments
float
get_float
(
const
std
::
string
&
key
,
float
default_value
=
0.0
f
)
const
{
if
(
_map
.
count
(
key
)
>
0
)
return
atof
(
_map
.
at
(
key
)
.
c_str
())
;
return
atof
(
_map
.
find
(
key
)
->
second
.
c_str
())
;
else
return
default_value
;
}
int
get_int
(
const
std
::
string
&
key
,
int
default_value
=
0
)
const
{
if
(
_map
.
count
(
key
)
>
0
)
return
atoi
(
_map
.
at
(
key
)
.
c_str
())
;
return
atoi
(
_map
.
find
(
key
)
->
second
.
c_str
())
;
else
return
default_value
;
}
...
...
@@ -90,7 +90,7 @@ class arguments
vec
res
(
size
);
if
(
_map
.
count
(
key
)
>
0
)
{
std
::
string
s
=
_map
.
at
(
key
)
;
std
::
string
s
=
_map
.
find
(
key
)
->
second
;
if
(
s
[
0
]
==
'\['
)
// Is an array of type [a, b, c]
{
int
i
=
0
;
...
...
sources/core/plugins_manager.cpp
View file @
76a933f6
...
...
@@ -130,7 +130,7 @@ function* plugins_manager::get_function(const std::string& n) const
}
else
{
return
_functions
.
at
(
n
)
;
return
_functions
.
find
(
n
)
->
second
;
}
}
data
*
plugins_manager
::
get_data
(
const
std
::
string
&
n
)
const
...
...
@@ -143,7 +143,7 @@ data* plugins_manager::get_data(const std::string& n) const
else
{
std
::
cout
<<
"<<DEBUG>> using
\"
"
<<
n
<<
"
\"
data loader"
<<
std
::
endl
;
return
_datas
.
at
(
n
)
;
return
_datas
.
find
(
n
)
->
second
;
}
}
fitter
*
plugins_manager
::
get_fitter
(
const
std
::
string
&
n
)
const
...
...
@@ -155,6 +155,6 @@ fitter* plugins_manager::get_fitter(const std::string& n) const
else
{
std
::
cout
<<
"<<DEBUG>> using
\"
"
<<
n
<<
"
\"
"
<<
std
::
endl
;
return
_fitters
.
at
(
n
)
;
return
_fitters
.
find
(
n
)
->
second
;
}
}
sources/core/rational_function.cpp
View file @
76a933f6
...
...
@@ -369,7 +369,7 @@ void rational_function::save_cpp(const std::string& filename, const arguments& a
file
<<
"{"
<<
std
::
endl
;
file
<<
"
\t
double p = "
;
for
(
int
i
=
0
;
i
<
a
.
size
();
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
a
.
size
();
++
i
)
{
if
(
i
>
0
&&
a
[
i
]
>=
0.0
)
{
...
...
@@ -380,7 +380,7 @@ void rational_function::save_cpp(const std::string& filename, const arguments& a
file
<<
";"
<<
std
::
endl
;
file
<<
"
\t
double q = "
;
for
(
int
i
=
0
;
i
<
b
.
size
();
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
b
.
size
();
++
i
)
{
if
(
i
>
0
)
file
<<
" + "
;
...
...
@@ -423,8 +423,8 @@ void rational_function::save_rational_function(const std::string& filename) cons
file
<<
"#NQ "
<<
b
.
size
()
/
_nY
<<
std
::
endl
;
file
<<
"#BASIS poly"
<<
std
::
endl
;
int
np
=
a
.
size
()
/
_nY
;
int
nq
=
b
.
size
()
/
_nX
;
unsigned
int
np
=
a
.
size
()
/
_nY
;
unsigned
int
nq
=
b
.
size
()
/
_nX
;
for
(
int
k
=
0
;
k
<
_nY
;
++
k
)
{
for
(
unsigned
int
i
=
0
;
i
<
np
;
++
i
)
...
...
Write
Preview
Markdown
is supported
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