Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSMOn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Harbor 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
Peter Frank Perroni
CSMOn
Commits
36ec8a3b
Commit
36ec8a3b
authored
7 years ago
by
Peter Frank Perroni
Browse files
Options
Downloads
Patches
Plain Diff
Updated makefile
parent
81b84b7d
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
Makefile
+8
-2
8 additions, 2 deletions
Makefile
cpp/CSMOn.hpp
+6
-5
6 additions, 5 deletions
cpp/CSMOn.hpp
cpp/Makefile
+2
-0
2 additions, 0 deletions
cpp/Makefile
cpp/pso_example.cpp
+1
-1
1 addition, 1 deletion
cpp/pso_example.cpp
python/Makefile
+8
-3
8 additions, 3 deletions
python/Makefile
with
25 additions
and
11 deletions
Makefile
+
8
−
2
View file @
36ec8a3b
.PHONY
:
all clean
# Compile the C++ code for CSMOn, plus a Python wrapper and a of couple examples.
all
:
CSMOn CSMOn_wrapper cpp_example
.PHONY
:
all clean_install clean
all
:
CSMOn CSMOn_wrapper cpp_example clean_install
CSMOn
:
$(
MAKE
)
-C
cpp
...
...
@@ -11,7 +13,11 @@ CSMOn_wrapper:
cpp_example
:
cpp/pso_example.cpp
g++
-o
cpp/pso_example cpp/pso_example.cpp cpp/PSO.o cpp/CSMOn.o
-Wall
-pedantic-errors
clean_install
:
$(
MAKE
)
-i
-C
cpp clean
clean
:
$(
MAKE
)
-i
-C
cpp clean
$(
MAKE
)
-i
-C
python clean
rm
cpp/pso_example
This diff is collapsed.
Click to expand it.
cpp/CSMOn.hpp
+
6
−
5
View file @
36ec8a3b
...
...
@@ -31,10 +31,11 @@
/**
* @mainpage Convergence Stabilization Modeling operating in Online Mode
*
* This is an automated method to estimate the best moment to stop swarm
* iterations based on the analysis of the convergence behavior presented
* during optimization, aiming to provide an effective balance between
* saving fitness evaluations and keeping the optimization quality.
* CSMOn ( formely called of C'MOn! ) is an automated method to estimate
* the best moment to stop swarm iterations based on the analysis of the
* convergence behavior presented during optimization, aiming to provide
* an effective balance between saving fitness evaluations and keeping
* the optimization quality.
* The convergence analysis is performed through a sequence of linear
* regressions using exponential and log-like curves.
*
...
...
@@ -66,7 +67,7 @@ typedef struct _point{
}
t_point
;
/**
* @brief Convergence Stabilization Modeling operating in Online Mode
( formely called of C'MOn! )
.
* @brief Convergence Stabilization Modeling operating in Online Mode.
*
* @date 04/Mar/2017
* @author Peter Frank Perroni (pfperroni@gmail.com)
...
...
This diff is collapsed.
Click to expand it.
cpp/Makefile
+
2
−
0
View file @
36ec8a3b
# Compile the C++ source code for CSMOn.
FONTS
=
PSO.cpp CSMOn.cpp
OBJECTS
=
$(
FONTS:.cpp
=
.o
)
FLAGS
=
-Wall
-pedantic-errors
...
...
This diff is collapsed.
Click to expand it.
cpp/pso_example.cpp
+
1
−
1
View file @
36ec8a3b
...
...
@@ -112,7 +112,7 @@ int main(int argc, char *argv[]){
double
fitnessFunction
(
double
*
x
,
int
n
){
double
s
=
0
;
for
(
int
i
=
0
;
i
<
n
;
i
++
){
s
+=
(
x
[
i
]
+
2
)
*
(
x
[
i
]
+
2
)
-
10
*
cos
(
2
*
PI
*
(
x
[
i
]
+
2
)
);
s
+=
x
[
i
]
*
x
[
i
]
-
10
*
cos
(
2
*
PI
*
x
[
i
]);
}
return
10
*
n
+
s
;
}
This diff is collapsed.
Click to expand it.
python/Makefile
+
8
−
3
View file @
36ec8a3b
# Compile the wrapper to call CSMOn from Python.
FONTS
=
CSMOn_wrapper.cpp
DEPENDENCIES
=
../cpp/PSO.o ../cpp/CSMOn.o
OBJECTS
=
$(
FONTS:.cpp
=
.o
)
FLAGS
=
-Wall
-pedantic-errors
-fPIC
.PHONY
:
all clean
.PHONY
:
all clean
clean-install
all
:
CSMOn_wrapper
all
:
CSMOn_wrapper
clean-install
CSMOn_wrapper
:
$(OBJECTS)
g++
-o
$@
.so
$^
$(
DEPENDENCIES
)
$(
FLAGS
)
-shared
...
...
@@ -13,6 +15,9 @@ CSMOn_wrapper: $(OBJECTS)
%.o
:
%.cpp
g++
-I
../cpp
$<
-c
-o
$@
$(
FLAGS
)
clean-install
:
rm
$(
OBJECTS
)
clean
:
rm
$(
OBJECTS
)
CSMOn.pyc fitnessFunction.pyc
rm
$(
OBJECTS
)
CSMOn.pyc fitnessFunction.pyc
CSMOn_wrapper.so
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