mirror of
https://github.com/rmontanana/PythonCythonTemplate.git
synced 2025-08-16 07:56:03 +00:00
Initial commit
This commit is contained in:
34
src/csrc/Test.cpp
Normal file
34
src/csrc/Test.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
# include "Test.h"
|
||||
# include <iostream>
|
||||
|
||||
namespace testSpace {
|
||||
Test::Test() = default;
|
||||
Test::~Test() = default;
|
||||
void Test::fit(samples_t& samples, labels_t& labels, weights_t& weights)
|
||||
{
|
||||
this->labels = labels;
|
||||
this->weights = weights;
|
||||
this->samples = samples;
|
||||
}
|
||||
void Test::print()
|
||||
{
|
||||
cout << "Labels: ";
|
||||
for (auto item : labels) {
|
||||
cout << item << ", ";
|
||||
}
|
||||
cout << "end." << endl;
|
||||
cout << "Weights: ";
|
||||
for (auto item : weights) {
|
||||
cout << item << ", ";
|
||||
}
|
||||
cout << "end." << endl;
|
||||
cout << "Samples: ";
|
||||
for (auto item : samples) {
|
||||
cout << "[";
|
||||
for (auto item2 : item) {
|
||||
cout << item2 << ", ";
|
||||
}
|
||||
cout << "], ";
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user