44 using namespace shark;
50 typedef RealVector result_type;
51 RealVector operator () (RealVector x)
const 58 typedef unsigned int result_type;
59 unsigned int operator () (
unsigned int y)
const 66 Add(RealVector offset) : m_offset(offset) {}
68 typedef RealVector result_type;
70 RealVector operator () (RealVector input)
const {
71 return (input + m_offset);
83 std::vector<RealVector> points;
87 std::vector<RealVector> inputs;
88 std::vector<unsigned int> labels;
106 Batches batches = data.
batches();
108 std::cout << batches.size() << std::endl;
109 for (Batches::iterator pos = batches.begin(); pos != batches.end(); ++pos) {
110 std::cout << *pos << std::endl;
117 BOOST_FOREACH(BatchRef batch, data.
batches()) {
118 std::cout << batch << std::endl;
121 std::cout << data.
batch(i) << std::endl;
123 BOOST_FOREACH(BatchRef batch, data.
batches()) {
124 for(std::size_t i=0; i !=
boost::size(batch); ++i) {
132 Elements elements = data.
elements();
133 for (Elements::iterator pos = elements.begin(); pos != elements.end(); ++pos) {
134 std::cout << *pos << std::endl;
138 BOOST_FOREACH(ElementRef element, data.
elements()) {
139 std::cout << element << std::endl;
145 std::vector<std::size_t> sizes =
classSizes(data);
153 std::vector<std::size_t> sizes =
classSizes(data);
175 RealVector v(3); v(0) = 1.0; v(1) = 3.0; v(2) = -0.5;
181 for (std::size_t i=0; i != view.
size(); ++i) {
182 std::cout << view[i] << std::endl;
184 std::vector<std::size_t> indices;
191 std::vector<std::size_t> indices;
192 std::size_t maximumBatchSize = 100;