Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cuteLib-hsrt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Glaser
cuteLib-hsrt
Commits
03440d89
Commit
03440d89
authored
4 weeks ago
by
tobiglaser
Browse files
Options
Downloads
Patches
Plain Diff
removed dynamicLoad example
parent
7e2d37c5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+0
-21
0 additions, 21 deletions
CMakeLists.txt
examples/dynamicLoadDummy.cpp
+0
-87
0 additions, 87 deletions
examples/dynamicLoadDummy.cpp
with
0 additions
and
108 deletions
CMakeLists.txt
+
0
−
21
View file @
03440d89
...
@@ -69,27 +69,6 @@ if(WIN32)
...
@@ -69,27 +69,6 @@ if(WIN32)
endif
(
WIN32
)
endif
(
WIN32
)
add_executable
(
LoaderDemo
src/main.cpp
examples/dynamicLoadDummy.cpp
)
target_include_directories
(
LoaderDemo PRIVATE
include
)
# Set the WIN32_EXECUTABLE property conditionally for Release, MinSizeRel, and RelWithDebInfo builds.
# This lets the exe run without a terminal, making stdout inaccessible for now.
if
(
WIN32
)
set_target_properties
(
LoaderDemo PROPERTIES WIN32_EXECUTABLE $<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>,$<CONFIG:RelWithDebInfo>>
)
endif
(
WIN32
)
# Use this command to copy the .dll from the lib folder next to the freshly built .exe. Which is the most simple way to get it working.
#add_custom_command(TARGET LoaderDemo POST_BUILD # Adds a post-build event to DynamicDemo
# COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
# "${PROJECT_SOURCE_DIR}/lib/cute.dll" # <--this is in-file
# $<TARGET_FILE_DIR:LoaderDemo>) # <--this is out-file path
add_executable
(
TSP
add_executable
(
TSP
src/main.cpp
src/main.cpp
examples/TSP.cpp
examples/TSP.cpp
...
...
This diff is collapsed.
Click to expand it.
examples/dynamicLoadDummy.cpp
deleted
100644 → 0
+
0
−
87
View file @
7e2d37c5
#include
"cute.h"
void
superDummy
();
void
advancedDummy
();
void
bubblesort
();
// Is run once at startup.
void
setup
()
{
//cute::setPlotTitle(0, "Hallo");
//cute::setPlotTitle(1, "Hochschule");
//cute::setPlotTitle(2, "Reutlingen");
cute
::
logMessage
(
"Hello CuteLib! :D"
);
cute
::
setProgress
(
69
);
//cute::setPlotVisible(1);
cute
::
setStatusMessage
(
"Hallo TEC"
);
cute
::
registerAlgorithm
(
superDummy
,
"DummyAlgo"
);
cute
::
registerAlgorithm
(
advancedDummy
,
"Problem"
);
cute
::
setProblemFile
(
"example.csv"
);
cute
::
setProblemSize
(
4
);
cute
::
enableAutorun
();
}
void
superDummy
()
{
int
prog
=
0
;
while
(
cute
::
ok
())
{
cute
::
setProgress
(
prog
);
cute
::
setStatusMessage
(
std
::
to_string
(
prog
));
++
prog
;
if
(
prog
>
100
)
prog
=
0
;
cute
::
delay
(
200
);
}
cute
::
logMessage
(
"Ended cleanly
\\
(^-^)/"
);
cute
::
setProgress
(
0
);
}
std
::
string
fvec2str
(
std
::
vector
<
float
>
v
)
{
std
::
string
s
;
for
(
size_t
i
=
0
;
i
<
v
.
size
()
-
1
;
i
++
)
{
s
+=
std
::
to_string
(
v
[
i
]);
while
(
s
.
back
()
==
'0'
)
{
s
.
pop_back
();
}
s
+=
", "
;
}
s
+=
std
::
to_string
(
v
.
back
());
while
(
s
.
back
()
==
'0'
)
{
s
.
pop_back
();
}
return
s
;
}
std
::
string
point2str
(
cute
::
Point
p
)
{
std
::
string
s
=
"( "
+
std
::
to_string
(
p
.
x
);
while
(
s
.
back
()
==
'0'
)
s
.
pop_back
();
s
+=
" , "
;
s
+=
std
::
to_string
(
p
.
y
);
while
(
s
.
back
()
==
'0'
)
s
.
pop_back
();
s
+=
" )"
;
return
s
;
}
void
advancedDummy
()
{
std
::
vector
<
float
>
problem1D
=
cute
::
getProblemData1D
();
cute
::
logMessage
(
fvec2str
(
problem1D
));
cute
::
setPlotTheme
(
problem1D
.
size
()
-
1
);
std
::
vector
<
cute
::
Point
>
problem2D
=
cute
::
getProblemData2D
();
for
(
auto
&&
p
:
problem2D
)
{
cute
::
logMessage
(
point2str
(
p
));
}
cute
::
setStatusMessage
(
"Done already!"
);
}
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