6 typedef unsigned int u32;
\r
7 typedef unsigned short u16;
\r
8 typedef unsigned char u8;
\r
12 /* Simple class for throwing exceptions */
\r
13 class stc_exception : public std::exception {
\r
15 stc_exception(std::string message, u32 error_id) { this->message = message; this->error_id = error_id; }
\r
16 virtual ~stc_exception() throw() {}
\r
17 virtual const char* what() const throw() { return message.c_str(); }
\r
20 std::string message;
\r
24 The following error_ids are in use:
\r
25 1 = Submatrix height must not exceed 31.
\r
26 2 = Not enough memory.
\r
27 3 = The message cannot be longer than the cover object.
\r
28 4 = No solution exists. - This happen when there are too many Inf values in cost vector and thus the solution does not exist due to sparse parity-check matrix.
\r
29 5 = Price vector limit exceeded. - There is a limit to cost elements when you use integer version of the algorithm. Try to use costs in double.
\r
30 6 = Maximum number of trials in layered construction exceeded.
\r
33 u32 *getMatrix(int width, int height);
\r