File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
src/SharpLearning.Benchmarks Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 11using System . Collections . Generic ;
2+ using System . Linq ;
23using BenchmarkDotNet . Attributes ;
34using SharpLearning . AdaBoost . Learners ;
45using SharpLearning . Common . Interfaces ;
@@ -50,9 +51,7 @@ public void Learn(string learnerName)
5051 learner . Learn ( m_features , m_targets ) ;
5152 }
5253
53- public IEnumerable < string > GetLearners ( )
54- {
55- return m_learners . Keys ;
56- }
54+ public IReadOnlyList < string > GetLearners ( ) =>
55+ m_learners . Keys . ToArray ( ) ;
5756 }
5857}
Original file line number Diff line number Diff line change 11using System . Collections . Generic ;
2+ using System . Linq ;
23using BenchmarkDotNet . Attributes ;
34using SharpLearning . AdaBoost . Learners ;
45using SharpLearning . Common . Interfaces ;
@@ -50,9 +51,7 @@ public void Learn(string learnerName)
5051 learner . Learn ( m_features , m_targets ) ;
5152 }
5253
53- public IEnumerable < string > GetLearners ( )
54- {
55- return m_learners . Keys ;
56- }
54+ public IReadOnlyList < string > GetLearners ( ) =>
55+ m_learners . Keys . ToArray ( ) ;
5756 }
5857}
You can’t perform that action at this time.
0 commit comments