C++ API Reference for Intel® Data Analytics Acceleration Library 2018 Update 3

data_source.h
1 /* file: data_source.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 Intel Corporation.
4 *
5 * This software and the related documents are Intel copyrighted materials, and
6 * your use of them is governed by the express license under which they were
7 * provided to you (License). Unless the License provides otherwise, you may not
8 * use, modify, copy, publish, distribute, disclose or transmit this software or
9 * the related documents without Intel's prior written permission.
10 *
11 * This software and the related documents are provided as is, with no express
12 * or implied warranties, other than those that are expressly stated in the
13 * License.
14 *******************************************************************************/
15 
16 /*
17 //++
18 // Declaration and implementation of the base data source class.
19 //--
20 */
21 
22 #ifndef __DATA_SOURCE_H__
23 #define __DATA_SOURCE_H__
24 
25 
26 #include "data_management/data/data_dictionary.h"
27 #include "data_management/data/numeric_table.h"
28 #include "data_management/data/homogen_numeric_table.h"
29 #include "data_management/data/aos_numeric_table.h"
30 #include "data_management/data/soa_numeric_table.h"
31 
32 #include "data_management/data_source/data_source_utils.h"
33 
34 namespace daal
35 {
36 namespace data_management
37 {
38 
39 namespace interface1
40 {
50 class DataSourceIface
51 {
52 public:
57  enum DataSourceStatus
58  {
59  readyForLoad = 1,
60  waitingForRows = 2,
61  endOfData = 3,
62  notReady = 4
63  };
64 
69  enum DictionaryCreationFlag
70  {
71  notDictionaryFromContext = 1,
72  doDictionaryFromContext = 2
73  };
74 
79  enum NumericTableAllocationFlag
80  {
81  notAllocateNumericTable = 1,
82  doAllocateNumericTable = 2
83  };
84 
85 public:
90  DAAL_DEPRECATED_VIRTUAL virtual DataSourceDictionary *getDictionary() = 0;
91 
96  virtual DataSourceDictionaryPtr getDictionarySharedPtr() = 0;
97 
101  virtual services::Status setDictionary(DataSourceDictionary *dict) = 0;
102 
106  virtual services::Status createDictionaryFromContext() = 0;
107 
112  virtual DataSourceStatus getStatus() = 0;
113 
118  virtual size_t getNumberOfColumns() = 0;
119 
124  virtual size_t getNumericTableNumberOfColumns() = 0;
125 
130  virtual size_t getNumberOfAvailableRows() = 0;
131 
135  virtual services::Status allocateNumericTable() = 0;
136 
141  virtual NumericTablePtr getNumericTable() = 0;
142 
146  virtual void freeNumericTable() = 0;
147 
152  virtual size_t loadDataBlock(size_t maxRows) = 0;
153 
160  virtual size_t loadDataBlock(size_t maxRows, size_t rowOffset, size_t fullRows) = 0;
161 
167  virtual size_t loadDataBlock(size_t maxRows, NumericTable *nt) = 0;
168 
176  virtual size_t loadDataBlock(size_t maxRows, size_t rowOffset, size_t fullRows, NumericTable *nt) = 0;
177 
181  virtual size_t loadDataBlock() = 0;
182 
187  virtual size_t loadDataBlock(NumericTable *nt) = 0;
188 };
189 
194 class DataSource : public DataSourceIface
195 {
196 public:
197  DataSource() : _dict(), _errors(new services::ErrorCollection()), _initialMaxRows(10), _autoNumericTableFlag(doAllocateNumericTable), _autoDictionaryFlag(doDictionaryFromContext) {}
198 
199  virtual ~DataSource() {}
200 
201  DAAL_DEPRECATED_VIRTUAL DataSourceDictionary *getDictionary() DAAL_C11_OVERRIDE
202  {
203  services::Status s = checkDictionary();
204  if(!s)
205  return NULL;
206  return _dict.get();
207  }
208 
209  DataSourceDictionaryPtr getDictionarySharedPtr() DAAL_C11_OVERRIDE
210  {
211  services::Status s = checkDictionary();
212  if(!s)
213  return DataSourceDictionaryPtr();
214  return _dict;
215  }
216 
217  services::Status setDictionary(DataSourceDictionary *dict) DAAL_C11_OVERRIDE
218  {
219  if(_dict)
220  return services::throwIfPossible(services::Status(services::ErrorDictionaryAlreadyAvailable));
221 
222  services::Status s = dict->checkDictionary();
223  if(!s)
224  return services::throwIfPossible(s);
225 
226  _dict.reset(dict, services::EmptyDeleter());
227  return services::Status();
228  }
229 
230  services::Status createDictionaryFromContext() DAAL_C11_OVERRIDE
231  {
232  return services::throwIfPossible(services::Status(services::ErrorMethodNotSupported));
233  }
234 
235  size_t loadDataBlock(size_t maxRows) DAAL_C11_OVERRIDE
236  {
237  services::Status s = checkDictionary();
238  s.add(checkNumericTable());
239  if(!s)
240  {
241  this->_status.add(services::throwIfPossible(s));
242  return 0;
243  }
244  return loadDataBlock(maxRows, this->DataSource::_spnt.get());
245  }
246 
247  size_t loadDataBlock(size_t maxRows, NumericTable *nt) DAAL_C11_OVERRIDE
248  {
249  this->_status.add(services::throwIfPossible(services::ErrorMethodNotSupported));
250  return 0;
251  }
252 
253  size_t loadDataBlock(size_t maxRows, size_t rowOffset, size_t fullRows) DAAL_C11_OVERRIDE
254  {
255  services::Status s = checkDictionary();
256  if(s)
257  s.add(checkNumericTable());
258  if(!s)
259  {
260  this->_status.add(services::throwIfPossible(s));
261  return 0;
262  }
263  return loadDataBlock(maxRows, rowOffset, fullRows, this->DataSource::_spnt.get());
264  }
265 
266  size_t loadDataBlock(size_t maxRows, size_t rowOffset, size_t fullRows, NumericTable *nt) DAAL_C11_OVERRIDE
267  {
268  this->_status.add(services::throwIfPossible(services::ErrorMethodNotSupported));
269  return 0;
270  }
271 
272  size_t loadDataBlock() DAAL_C11_OVERRIDE
273  {
274  services::Status s = checkDictionary();
275  if(s)
276  {
277  s.add(checkNumericTable());
278  }
279  if(!s)
280  {
281  this->_status.add(services::throwIfPossible(s));
282  return 0;
283  }
284  return loadDataBlock(this->DataSource::_spnt.get());
285  }
286 
287  size_t loadDataBlock(NumericTable *nt) DAAL_C11_OVERRIDE
288  {
289  this->_status.add(services::throwIfPossible(services::ErrorMethodNotSupported));
290  return 0;
291  }
292 
293  NumericTablePtr getNumericTable() DAAL_C11_OVERRIDE
294  {
295  checkNumericTable();
296  return _spnt;
297  }
298 
299  size_t getNumberOfColumns() DAAL_C11_OVERRIDE
300  {
301  checkDictionary();
302  return _dict ? _dict->getNumberOfFeatures() : 0;
303  }
304 
309  services::Status status() const
310  {
311  services::Status s = _status;
312  /*if(_spnt.get())
313  s.add(_spnt->status());*/
314  return s;
315  }
316 
322  DAAL_DEPRECATED services::SharedPtr<services::ErrorCollection> getErrors()
323  {
324  return status().getCollection();
325  }
326 
327  virtual size_t getNumericTableNumberOfColumns() DAAL_C11_OVERRIDE
328  {
329  return getNumberOfColumns();
330  }
331 
332 protected:
333  DataSourceDictionaryPtr _dict;
334  NumericTablePtr _spnt;
335 
336  NumericTableAllocationFlag _autoNumericTableFlag;
337  DictionaryCreationFlag _autoDictionaryFlag;
338  services::Status _status;
339  services::SharedPtr<services::ErrorCollection> _errors;
340  size_t _initialMaxRows;
341 
345  services::Status checkNumericTable()
346  {
347  if( _spnt.get() == NULL )
348  {
349  if( _autoNumericTableFlag == notAllocateNumericTable )
350  return services::throwIfPossible(services::Status(services::ErrorNumericTableNotAllocated));
351  return allocateNumericTable();
352  }
353  return services::Status();
354  }
355 
359  services::Status checkDictionary()
360  {
361  if( _dict == 0 )
362  {
363  if( _autoDictionaryFlag == notDictionaryFromContext )
364  return services::throwIfPossible(services::Status(services::ErrorDictionaryNotAvailable));
365  return createDictionaryFromContext();
366  }
367  return services::Status();
368  }
369 
379  template<typename NumericTableType> services::Status allocateNumericTableImpl(services::SharedPtr<NumericTableType> &nt);
380 
390  template<typename FPType> services::Status allocateNumericTableImpl(services::SharedPtr<HomogenNumericTable<FPType> > &nt);
391 
392  size_t getStructureSize()
393  {
394  size_t structureSize = 0;
395  size_t nFeatures = _dict->getNumberOfFeatures();
396  for(size_t i = 0; i < nFeatures; i++)
397  {
398  data_feature_utils::IndexNumType indexNumType = (*_dict)[i].ntFeature.indexType;
399  structureSize += (*_dict)[i].ntFeature.typeSize;
400  }
401  return structureSize;
402  }
403 
404  virtual services::Status setNumericTableDictionary(NumericTablePtr nt)
405  {
406  if (!nt) return services::throwIfPossible(services::Status(services::ErrorNullNumericTable));
407  NumericTableDictionaryPtr ntDict = nt->getDictionarySharedPtr();
408  if (!ntDict) return services::throwIfPossible(services::Status(services::ErrorDictionaryNotAvailable));
409 
410  size_t nFeatures = ntDict->getNumberOfFeatures();
411 
412  for(size_t i = 0; i < nFeatures; i++)
413  {
414  (*ntDict)[i] = (*_dict)[i].ntFeature;
415  }
416  return services::Status();
417  }
418 };
419 
420 template<typename NumericTableType>
421 inline services::Status DataSource::allocateNumericTableImpl(services::SharedPtr<NumericTableType> &nt)
422 {
423  nt = services::SharedPtr<NumericTableType>();
424  return services::Status();
425 }
426 
427 template<>
428 inline services::Status DataSource::allocateNumericTableImpl(AOSNumericTablePtr &nt)
429 {
430  size_t nFeatures = _dict->getNumberOfFeatures();
431  size_t structureSize = getStructureSize();
432  services::Status s;
433  nt = AOSNumericTable::create(structureSize, nFeatures, 0, &s);
434  if (!s) return s;
435  s |= setNumericTableDictionary(nt);
436  return s;
437 }
438 
439 template<>
440 inline services::Status DataSource::allocateNumericTableImpl(SOANumericTablePtr &nt)
441 {
442  nt = SOANumericTablePtr();
443  return services::Status();
444 }
445 
446 template<typename FPType>
447 inline services::Status DataSource::allocateNumericTableImpl(services::SharedPtr<HomogenNumericTable<FPType> > &nt)
448 {
449  size_t nFeatures = getNumericTableNumberOfColumns();
450  services::Status s;
451  nt = HomogenNumericTable<FPType>::create(nFeatures, 0, NumericTableIface::doNotAllocate, &s);
452  if (!s) return s;
453  s |= setNumericTableDictionary(nt);
454  return s;
455 }
456 
457 
462 template< typename _numericTableType, typename _summaryStatisticsType = DAAL_SUMMARY_STATISTICS_TYPE >
463 class DataSourceTemplate : public DataSource
464 {
465 public:
466  typedef _numericTableType numericTableType;
467 
468 public:
469  DataSourceTemplate( NumericTableAllocationFlag doAllocateNumericTable,
470  DictionaryCreationFlag doCreateDictionaryFromContext ) : DataSource()
471  {
472  DataSource::_autoNumericTableFlag = doAllocateNumericTable;
473  DataSource::_autoDictionaryFlag = doCreateDictionaryFromContext;
474  }
475 
476  virtual ~DataSourceTemplate() {}
477 
478 protected:
479  services::Status allocateNumericTable() DAAL_C11_OVERRIDE
480  {
481  if( _spnt.get() != NULL )
482  return services::throwIfPossible(services::Status(services::ErrorNumericTableAlreadyAllocated));
483 
484  services::Status s = checkDictionary();
485  if(!s)
486  return s;
487 
488  services::SharedPtr<numericTableType> nt;
489 
490  s |= allocateNumericTableImpl( nt );
491  _spnt = nt;
492 
493  services::SharedPtr<HomogenNumericTable<_summaryStatisticsType> > ssNt;
494 
495  s |= allocateNumericTableImpl( ssNt );
496  _spnt->basicStatistics.set(NumericTable::minimum, ssNt);
497 
498  s |= allocateNumericTableImpl( ssNt );
499  _spnt->basicStatistics.set(NumericTable::maximum, ssNt);
500 
501  s |= allocateNumericTableImpl( ssNt );
502  _spnt->basicStatistics.set(NumericTable::sum, ssNt);
503 
504  s |= allocateNumericTableImpl( ssNt );
505  _spnt->basicStatistics.set(NumericTable::sumSquares, ssNt);
506  return s;
507  }
508 
509  void freeNumericTable() DAAL_C11_OVERRIDE
510  {
511  _spnt = NumericTablePtr();
512  }
513 
514  services::Status resizeNumericTableImpl(const size_t linesToLoad, NumericTable* nt)
515  {
516  if(!nt)
517  return services::Status(services::ErrorNullInputNumericTable);
518 
519  if(!_dict)
520  return services::Status(services::ErrorDictionaryNotAvailable);
521 
522  size_t nFeatures = getNumericTableNumberOfColumns();
523 
524  if (nt->getNumberOfColumns() < nFeatures) {
525  nt->getDictionarySharedPtr()->setNumberOfFeatures(nFeatures);
526  }
527 
528  nt->resize(0);
529  nt->resize(linesToLoad);
530 
531  const size_t nCols = nt->getNumberOfColumns();
532 
533  nt->allocateBasicStatistics();
534 
535  NumericTablePtr ntMin = nt->basicStatistics.get(NumericTable::minimum );
536  NumericTablePtr ntMax = nt->basicStatistics.get(NumericTable::maximum );
537  NumericTablePtr ntSum = nt->basicStatistics.get(NumericTable::sum );
538  NumericTablePtr ntSumSq = nt->basicStatistics.get(NumericTable::sumSquares);
539 
540  if( ntMin->getNumberOfColumns() != nCols || ntMin->getNumberOfRows() != 1 )
541  {
542  if( ntMin->getNumberOfColumns() != nCols )
543  {
544  ntMin->getDictionarySharedPtr()->setNumberOfFeatures(nCols);
545  }
546  ntMin->resize(1);
547  }
548 
549  if( ntMax->getNumberOfColumns() != nCols || ntMax->getNumberOfRows() != 1 )
550  {
551  if( ntMax->getNumberOfColumns() != nCols )
552  {
553  ntMax->getDictionarySharedPtr()->setNumberOfFeatures(nCols);
554  }
555  ntMax->resize(1);
556  }
557 
558  if( ntSum->getNumberOfColumns() != nCols || ntSum->getNumberOfRows() != 1 )
559  {
560  if( ntSum->getNumberOfColumns() != nCols )
561  {
562  ntSum->getDictionarySharedPtr()->setNumberOfFeatures(nCols);
563  }
564  ntSum->resize(1);
565  }
566 
567  if( ntSumSq->getNumberOfColumns() != nCols || ntSumSq->getNumberOfRows() != 1 )
568  {
569  if( ntSumSq->getNumberOfColumns() != nCols )
570  {
571  ntSumSq->getDictionarySharedPtr()->setNumberOfFeatures(nCols);
572  }
573  ntSumSq->resize(1);
574  }
575  return services::Status();
576  }
577 
578  services::Status updateStatistics(size_t ntRowIndex, NumericTable *nt, size_t offset = 0)
579  {
580  if(!nt)
581  return services::Status(services::ErrorNullInputNumericTable);
582 
583  NumericTablePtr ntMin = nt->basicStatistics.get(NumericTable::minimum );
584  NumericTablePtr ntMax = nt->basicStatistics.get(NumericTable::maximum );
585  NumericTablePtr ntSum = nt->basicStatistics.get(NumericTable::sum );
586  NumericTablePtr ntSumSq = nt->basicStatistics.get(NumericTable::sumSquares);
587 
588  BlockDescriptor<_summaryStatisticsType> blockMin;
589  BlockDescriptor<_summaryStatisticsType> blockMax;
590  BlockDescriptor<_summaryStatisticsType> blockSum;
591  BlockDescriptor<_summaryStatisticsType> blockSumSq;
592 
593  ntMin->getBlockOfRows(0, 1, readWrite, blockMin);
594  ntMax->getBlockOfRows(0, 1, readWrite, blockMax);
595  ntSum->getBlockOfRows(0, 1, readWrite, blockSum);
596  ntSumSq->getBlockOfRows(0, 1, readWrite, blockSumSq);
597 
598  _summaryStatisticsType *minimum = blockMin.getBlockPtr();
599  _summaryStatisticsType *maximum = blockMax.getBlockPtr();
600  _summaryStatisticsType *sum = blockSum.getBlockPtr();
601  _summaryStatisticsType *sumSquares = blockSumSq.getBlockPtr();
602 
603  size_t nCols = nt->getNumberOfColumns();
604 
605  if( minimum == NULL || maximum == NULL || sum == NULL || sumSquares == NULL )
606  {
607  ntMin->releaseBlockOfRows(blockMin);
608  ntMax->releaseBlockOfRows(blockMax);
609  ntSum->releaseBlockOfRows(blockSum);
610  ntSumSq->releaseBlockOfRows(blockSumSq);
611  return services::Status(services::ErrorIncorrectInputNumericTable);
612  }
613 
614  BlockDescriptor<_summaryStatisticsType> block;
615  nt->getBlockOfRows( ntRowIndex + offset, 1, readOnly, block );
616  _summaryStatisticsType *row = block.getBlockPtr();
617 
618  if( ntRowIndex != 0 )
619  {
620  for( size_t i = 0; i < nCols; i++ )
621  {
622  if( minimum[i] > row[i] ) { minimum[i] = row[i]; }
623  if( maximum[i] < row[i] ) { maximum[i] = row[i]; }
624  sum[i] += row[i];
625  sumSquares[i] += row[i] * row[i];
626  }
627  }
628  else
629  {
630  for( size_t i = 0; i < nCols; i++ )
631  {
632  minimum[i] = row[i];
633  maximum[i] = row[i];
634  sum[i] = row[i];
635  sumSquares[i] = row[i] * row[i];
636  }
637  }
638 
639  nt->releaseBlockOfRows( block );
640  ntMin->releaseBlockOfRows( blockMin );
641  ntMax->releaseBlockOfRows( blockMax );
642  ntSum->releaseBlockOfRows( blockSum );
643  ntSumSq->releaseBlockOfRows( blockSumSq );
644  return services::Status();
645  }
646 
647  services::Status combineSingleStatistics(NumericTable *ntSrc, NumericTable *ntDst, bool wasEmpty, NumericTable::BasicStatisticsId id)
648  {
649  if( ntSrc == NULL || ntDst == NULL )
650  return services::Status(services::ErrorNullInputNumericTable);
651 
652  NumericTablePtr ntSrcStat = ntSrc->basicStatistics.get(id);
653  NumericTablePtr ntDstStat = ntDst->basicStatistics.get(id);
654 
655  BlockDescriptor<_summaryStatisticsType> blockSrc;
656  BlockDescriptor<_summaryStatisticsType> blockDst;
657 
658  ntSrcStat->getBlockOfRows(0, 1, readOnly, blockSrc);
659  ntDstStat->getBlockOfRows(0, 1, readWrite, blockDst);
660 
661  const _summaryStatisticsType *src = blockSrc.getBlockPtr();
662  _summaryStatisticsType *dst = blockDst.getBlockPtr();
663 
664  if( src == NULL || dst == NULL )
665  {
666  ntSrcStat->releaseBlockOfRows(blockSrc);
667  ntDstStat->releaseBlockOfRows(blockDst);
668  return services::Status(services::ErrorIncorrectInputNumericTable);
669  }
670 
671  const size_t nColsSrc = ntSrc->getNumberOfColumns();
672  const size_t nCols = ntDst->getNumberOfColumns();
673 
674  if (nCols != nColsSrc)
675  {
676  ntSrcStat->releaseBlockOfRows(blockSrc);
677  ntDstStat->releaseBlockOfRows(blockDst);
678  return services::Status(services::ErrorIncorrectInputNumericTable);
679  }
680 
681  if( wasEmpty )
682  {
683  for( size_t i = 0; i < nCols; i++ )
684  {
685  dst[i] = src[i];
686  }
687  }
688  else
689  {
690  if (id == NumericTable::minimum)
691  {
692  for( size_t i = 0; i < nCols; i++ )
693  {
694  if (dst[i] > src[i])
695  {
696  dst[i] = src[i];
697  }
698  }
699  }
700  else
701  if (id == NumericTable::maximum)
702  {
703  for( size_t i = 0; i < nCols; i++ )
704  {
705  if (dst[i] < src[i])
706  {
707  dst[i] = src[i];
708  }
709  }
710  }
711  else
712  if (id == NumericTable::sum)
713  {
714  for( size_t i = 0; i < nCols; i++ )
715  {
716  dst[i] += src[i];
717  }
718  }
719  else
720  if (id == NumericTable::sumSquares)
721  {
722  for( size_t i = 0; i < nCols; i++ )
723  {
724  dst[i] += src[i];
725  }
726  }
727  }
728 
729  ntSrcStat->releaseBlockOfRows( blockSrc );
730  ntDstStat->releaseBlockOfRows( blockDst );
731  return services::Status();
732  }
733 
734  services::Status combineStatistics(NumericTable *ntSrc, NumericTable *ntDst, bool wasEmpty)
735  {
736  services::Status s;
737  s.add(combineSingleStatistics(ntSrc, ntDst, wasEmpty, NumericTable::minimum));
738  s.add(combineSingleStatistics(ntSrc, ntDst, wasEmpty, NumericTable::maximum));
739  s.add(combineSingleStatistics(ntSrc, ntDst, wasEmpty, NumericTable::sum));
740  s.add(combineSingleStatistics(ntSrc, ntDst, wasEmpty, NumericTable::sumSquares));
741  return s;
742  }
743 };
745 } // namespace interface1
746 using interface1::DataSourceIface;
747 using interface1::DataSource;
748 using interface1::DataSourceTemplate;
749 
750 }
751 }
752 #endif
daal::data_management::interface1::DataSource::loadDataBlock
size_t loadDataBlock(size_t maxRows, size_t rowOffset, size_t fullRows) DAAL_C11_OVERRIDE
Definition: data_source.h:253
daal::data_management::interface1::DataSource::getDictionary
DAAL_DEPRECATED_VIRTUAL DataSourceDictionary * getDictionary() DAAL_C11_OVERRIDE
Definition: data_source.h:201
daal::data_management::interface1::DataSource::checkDictionary
services::Status checkDictionary()
Definition: data_source.h:359
daal::services::ErrorDictionaryAlreadyAvailable
Definition: error_indexes.h:151
daal::services::ErrorNullInputNumericTable
Definition: error_indexes.h:81
daal
Definition: algorithm_base_common.h:31
daal::services::ErrorIncorrectInputNumericTable
Definition: error_indexes.h:75
daal::data_management::interface1::DataSourceIface
Abstract interface class that defines the interface for a data management component responsible for r...
Definition: data_source.h:50
daal::data_management::interface1::DataSourceIface::allocateNumericTable
virtual services::Status allocateNumericTable()=0
daal::services::ErrorNumericTableNotAllocated
Definition: error_indexes.h:155
daal::data_management::interface1::DataSource::status
services::Status status() const
Definition: data_source.h:309
daal::data_management::interface1::DataSourceIface::createDictionaryFromContext
virtual services::Status createDictionaryFromContext()=0
daal::data_management::interface1::DataSourceIface::getNumberOfAvailableRows
virtual size_t getNumberOfAvailableRows()=0
daal::data_management::interface1::NumericTable::getDictionarySharedPtr
virtual NumericTableDictionaryPtr getDictionarySharedPtr() const DAAL_C11_OVERRIDE
Definition: numeric_table.h:632
daal::data_management::interface1::DataSourceIface::loadDataBlock
virtual size_t loadDataBlock()=0
daal::data_management::interface1::DataSourceIface::DictionaryCreationFlag
DictionaryCreationFlag
Specifies whether a Data Dictionary is created from the context of a Data Source. ...
Definition: data_source.h:69
daal::data_management::interface1::DataSource::getNumericTable
NumericTablePtr getNumericTable() DAAL_C11_OVERRIDE
Definition: data_source.h:293
daal::algorithms::low_order_moments::maximum
Definition: low_order_moments_types.h:88
daal::data_management::interface1::DataSource
Implements the abstract DataSourceIface interface.
Definition: data_source.h:194
daal::data_management::interface1::DataSourceIface::notAllocateNumericTable
Definition: data_source.h:81
daal::data_management::interface1::NumericTable::getNumberOfColumns
size_t getNumberOfColumns() const
Definition: numeric_table.h:651
daal::data_management::interface1::DataSourceIface::freeNumericTable
virtual void freeNumericTable()=0
daal::algorithms::low_order_moments::minimum
Definition: low_order_moments_types.h:87
daal::data_management::interface1::DataSource::getDictionarySharedPtr
DataSourceDictionaryPtr getDictionarySharedPtr() DAAL_C11_OVERRIDE
Definition: data_source.h:209
daal::data_management::interface1::DataSource::getNumberOfColumns
size_t getNumberOfColumns() DAAL_C11_OVERRIDE
Definition: data_source.h:299
daal::data_management::interface1::DataSourceTemplate::allocateNumericTable
services::Status allocateNumericTable() DAAL_C11_OVERRIDE
Definition: data_source.h:479
daal::data_management::interface1::DataSource::loadDataBlock
size_t loadDataBlock(size_t maxRows) DAAL_C11_OVERRIDE
Definition: data_source.h:235
daal::data_management::interface1::DataSourceIface::getNumericTable
virtual NumericTablePtr getNumericTable()=0
daal::data_management::interface1::DataSource::loadDataBlock
size_t loadDataBlock(NumericTable *nt) DAAL_C11_OVERRIDE
Definition: data_source.h:287
daal::data_management::interface1::DataSourceIface::doAllocateNumericTable
Definition: data_source.h:82
daal::data_management::interface1::DataSourceTemplate
Implements the abstract DataSourceIface interface.
Definition: data_source.h:463
daal::data_management::interface1::NumericTableIface::minimum
Definition: numeric_table.h:296
daal::data_management::interface1::NumericTable::allocateBasicStatistics
virtual services::Status allocateBasicStatistics() DAAL_C11_OVERRIDE
daal::algorithms::low_order_moments::sumSquares
Definition: low_order_moments_types.h:90
daal::data_management::interface1::DataSource::checkNumericTable
services::Status checkNumericTable()
Definition: data_source.h:345
daal::algorithms::covariance::sum
Definition: covariance_types.h:78
daal::data_management::interface1::HomogenNumericTable::create
static services::SharedPtr< HomogenNumericTable< DataType > > create(NumericTableDictionaryPtr ddictForHomogenNumericTable, services::Status *stat=NULL)
Definition: homogen_numeric_table.h:91
daal::data_management::interface1::NumericTable
Class for a data management component responsible for representation of data in the numeric format...
Definition: numeric_table.h:574
daal::data_management::interface1::DataSourceTemplate::freeNumericTable
void freeNumericTable() DAAL_C11_OVERRIDE
Definition: data_source.h:509
daal::data_management::interface1::DataSourceIface::setDictionary
virtual services::Status setDictionary(DataSourceDictionary *dict)=0
daal::data_management::interface1::DataSource::loadDataBlock
size_t loadDataBlock() DAAL_C11_OVERRIDE
Definition: data_source.h:272
daal::data_management::interface1::NumericTableIface::doNotAllocate
Definition: numeric_table.h:285
daal::data_management::interface1::NumericTable::resize
virtual services::Status resize(size_t nrows) DAAL_C11_OVERRIDE
Definition: numeric_table.h:636
daal::data_management::interface1::DataSource::getErrors
DAAL_DEPRECATED services::SharedPtr< services::ErrorCollection > getErrors()
Definition: data_source.h:322
daal::services::ErrorNumericTableAlreadyAllocated
Definition: error_indexes.h:154
daal::data_management::interface1::DataSourceIface::doDictionaryFromContext
Definition: data_source.h:72
daal::data_management::interface1::DataSourceIface::DataSourceStatus
DataSourceStatus
Specifies the status of the Data Source.
Definition: data_source.h:57
daal::data_management::interface1::NumericTableIface::maximum
Definition: numeric_table.h:297
daal::data_management::interface1::NumericTableIface::BasicStatisticsId
BasicStatisticsId
Enumeration to specify estimates of basic statistics stored.
Definition: numeric_table.h:294
daal::data_management::interface1::DataSourceIface::readyForLoad
Definition: data_source.h:59
daal::data_management::interface1::AOSNumericTable::create
static services::SharedPtr< AOSNumericTable > create(size_t structSize=0, size_t ncol=0, size_t nrow=0, services::Status *stat=NULL)
daal::data_management::interface1::DataSourceIface::getNumberOfColumns
virtual size_t getNumberOfColumns()=0
daal::data_management::interface1::DataSource::createDictionaryFromContext
services::Status createDictionaryFromContext() DAAL_C11_OVERRIDE
Definition: data_source.h:230
daal::services::ErrorDictionaryNotAvailable
Definition: error_indexes.h:152
daal::data_management::interface1::DataSourceIface::notDictionaryFromContext
Definition: data_source.h:71
daal::data_management::interface1::DataSourceIface::waitingForRows
Definition: data_source.h:60
daal::data_management::interface1::DataSource::loadDataBlock
size_t loadDataBlock(size_t maxRows, size_t rowOffset, size_t fullRows, NumericTable *nt) DAAL_C11_OVERRIDE
Definition: data_source.h:266
daal::data_management::interface1::DataSourceIface::getDictionary
virtual DAAL_DEPRECATED_VIRTUAL DataSourceDictionary * getDictionary()=0
daal::data_management::interface1::DataSourceIface::endOfData
Definition: data_source.h:61
daal::data_management::interface1::DataSource::getNumericTableNumberOfColumns
virtual size_t getNumericTableNumberOfColumns() DAAL_C11_OVERRIDE
Definition: data_source.h:327
daal::data_management::interface1::DataSourceIface::getDictionarySharedPtr
virtual DataSourceDictionaryPtr getDictionarySharedPtr()=0
daal::data_management::interface1::DataSourceIface::NumericTableAllocationFlag
NumericTableAllocationFlag
Specifies whether a Numeric Table is allocated inside of the Data Source object.
Definition: data_source.h:79
daal::data_management::interface1::DataSource::allocateNumericTableImpl
services::Status allocateNumericTableImpl(services::SharedPtr< NumericTableType > &nt)
Definition: data_source.h:421
daal::data_management::interface1::NumericTableIface::sum
Definition: numeric_table.h:298
daal::algorithms::implicit_als::training::offset
Definition: implicit_als_training_types.h:148
daal::data_management::interface1::DataSource::loadDataBlock
size_t loadDataBlock(size_t maxRows, NumericTable *nt) DAAL_C11_OVERRIDE
Definition: data_source.h:247
daal::data_management::interface1::DataSourceIface::getStatus
virtual DataSourceStatus getStatus()=0
daal::data_management::interface1::NumericTableIface::sumSquares
Definition: numeric_table.h:299
daal::data_management::interface1::DataSourceIface::getNumericTableNumberOfColumns
virtual size_t getNumericTableNumberOfColumns()=0
daal::services::ErrorNullNumericTable
Definition: error_indexes.h:113
daal::data_management::interface1::DataSource::setDictionary
services::Status setDictionary(DataSourceDictionary *dict) DAAL_C11_OVERRIDE
Definition: data_source.h:217
daal::data_management::interface1::DataSourceIface::notReady
Definition: data_source.h:62
daal::data_management::interface1::HomogenNumericTable
Class that provides methods to access data stored as a contiguous array of homogeneous feature vector...
Definition: homogen_numeric_table.h:50
daal::services::ErrorMethodNotSupported
Definition: error_indexes.h:69
daal::data_management::interface1::Dictionary
Class that represents a dictionary of a data set and provides methods to work with the data dictionar...
Definition: data_dictionary.h:158

For more complete information about compiler optimizations, see our Optimization Notice.