Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
213
Issues
213
List
Boards
Labels
Milestones
Merge Requests
11
Merge Requests
11
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
3ccfd743
Commit
3ccfd743
authored
Apr 18, 2017
by
Ludovic Hussonnois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
REFAC: Use boost::make_shared
parent
77534adc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx
...tions/AppClassification/app/otbComputeConfusionMatrix.cxx
+1
-1
Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx
...ations/AppClassification/app/otbTrainVectorClassifier.cxx
+1
-1
Modules/Learning/Unsupervised/include/otbContingencyTable.h
Modules/Learning/Unsupervised/include/otbContingencyTable.h
+1
-1
Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.txx
...supervised/include/otbSharkKMeansMachineLearningModel.txx
+3
-3
No files found.
Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx
View file @
3ccfd743
...
...
@@ -217,7 +217,7 @@ private:
{
std
::
ofstream
outFile
;
outFile
.
open
(
this
->
GetParameterString
(
"out"
).
c_str
()
);
outFile
<<
contingencyTable
->
ToC
sv
();
outFile
<<
contingencyTable
->
ToC
SV
();
outFile
.
close
();
}
...
...
Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx
View file @
3ccfd743
...
...
@@ -113,7 +113,7 @@ protected:
// Write contingency table
std
::
ofstream
outFile
;
outFile
.
open
(
this
->
GetParameterString
(
"io.confmatout"
).
c_str
()
);
outFile
<<
table
->
ToC
sv
();
outFile
<<
table
->
ToC
SV
();
}
}
...
...
Modules/Learning/Unsupervised/include/otbContingencyTable.h
View file @
3ccfd743
...
...
@@ -105,7 +105,7 @@ public:
return
o
;
}
std
::
string
ToC
sv
()
const
std
::
string
ToC
SV
()
const
{
const
char
separator
=
','
;
...
...
Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.txx
View file @
3ccfd743
...
...
@@ -54,7 +54,7 @@ SharkKMeansMachineLearningModel<TInputValue, TOutputValue>
m_Normalized( false ), m_K(2), m_MaximumNumberOfIterations( 10 )
{
// Default set HardClusteringModel
m_ClusteringModel = boost::
shared_ptr<ClusteringModelType>(new ClusteringModelType( &m_Centroids )
);
m_ClusteringModel = boost::
make_shared<ClusteringModelType>( &m_Centroids
);
}
...
...
@@ -81,7 +81,7 @@ SharkKMeansMachineLearningModel<TInputValue, TOutputValue>
// Use a Hard Clustering Model for classification
shark::kMeans( data, m_K, m_Centroids, m_MaximumNumberOfIterations );
m_ClusteringModel = boost::
shared_ptr<ClusteringModelType>(new ClusteringModelType( &m_Centroids )
);
m_ClusteringModel = boost::
make_shared<ClusteringModelType>( &m_Centroids
);
}
template<class TInputValue, class TOutputValue>
...
...
@@ -153,7 +153,7 @@ SharkKMeansMachineLearningModel<TInputValue, TOutputValue>
shark::Data<ClusteringOutputType> clusters;
try
{
clusters = ( *m_ClusteringModel )( inputSamples );
clusters = ( *m_ClusteringModel )( inputSamples );
}
catch( ... )
{
...
...
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