Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
120ca9ab
Commit
120ca9ab
authored
Apr 12, 2017
by
Guillaume Pasero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: LibSVM silent unless OTB_SHOW_ALL_MSG_DEBUG is on
parent
16e6a638
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
Modules/Core/Common/include/otbUtils.h
Modules/Core/Common/include/otbUtils.h
+3
-0
Modules/Core/Common/src/otbUtils.cxx
Modules/Core/Common/src/otbUtils.cxx
+4
-0
Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.txx
...ning/Supervised/include/otbLibSVMMachineLearningModel.txx
+4
-0
No files found.
Modules/Core/Common/include/otbUtils.h
View file @
120ca9ab
...
...
@@ -48,6 +48,9 @@ namespace Utils
return
s
.
str
();
}
/** Function that prints nothing (usefull to disable libsvm logs)*/
void
OTBCommon_EXPORT
PrintNothing
(
const
char
*
s
);
}
}
// namespace otb
...
...
Modules/Core/Common/src/otbUtils.cxx
View file @
120ca9ab
...
...
@@ -37,6 +37,10 @@ bool IsLonLatValid(double lon, double lat)
return
true
;
}
void
PrintNothing
(
const
char
*
/* s */
)
{
}
}
}
Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.txx
View file @
120ca9ab
...
...
@@ -26,6 +26,7 @@
#include "otbSVMCrossValidationCostFunction.h"
#include "otbExhaustiveExponentialOptimizer.h"
#include "otbMacro.h"
#include "otbUtils.h"
namespace otb
{
...
...
@@ -65,6 +66,9 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue>
this->m_Problem.l = 0;
this->m_Problem.y = ITK_NULLPTR;
this->m_Problem.x = ITK_NULLPTR;
#ifndef OTB_SHOW_ALL_MSG_DEBUG
svm_set_print_string_function(&otb::Utils::PrintNothing);
#endif
}
template <class TInputValue, class TOutputValue>
...
...
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