Cosan  1.0
Data Analytics Library
Exceptions.h
Go to the documentation of this file.
1 #ifndef EXCEPTION_H
2 #define EXCEPTION_H
3 
4 // import from other lib
5 #include<exception>
6 
7 // import from Cosan
8 
9 namespace Cosan
10 {
11  /*
12  Exception for different input matrix sizes
13  */
14  class DiffSizeException: public std::exception
15  {
16  virtual const char* what()
17  {
18  return "The size of given matrices are different";
19  };
20 
22 
23  class TooSmallSizeException: public std::exception
24  {
25  virtual const char* what()
26  {
27  return "The number of rows is too small";
28  };
29 
31 
32 
33  /*
34  Exceptin for invalid lable shape
35  */
36  class InvalidLabelShapeException: public std::exception
37  {
38  virtual const char* what()
39  {
40  return "The shape of the matrix is required to be (n ,1)";
41  };
43 };
44 
45 #endif
Cosan
Definition: CosanBO.h:29
Cosan::SmallRows
Cosan::TooSmallSizeException SmallRows
Cosan::InvalidLabelShapeException::what
virtual const char * what()
Definition: Exceptions.h:38
Cosan::InvalidLabelShape
Cosan::InvalidLabelShapeException InvalidLabelShape
Cosan::DiffSizeException::what
virtual const char * what()
Definition: Exceptions.h:16
Cosan::InvalidLabelShapeException
Definition: Exceptions.h:37
Cosan::DiffSizeException
Definition: Exceptions.h:15
Cosan::TooSmallSizeException
Definition: Exceptions.h:24
Cosan::DiffSize
Cosan::DiffSizeException DiffSize
Cosan::TooSmallSizeException::what
virtual const char * what()
Definition: Exceptions.h:25