C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

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

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