JWS C Library
C language utility library
regress.h
Go to the documentation of this file.
00001 /*
00002  * This work is licensed under a Creative Commons 
00003  * Attribution-Noncommercial-Share Alike 3.0 United States License.
00004  * 
00005  *    http://creativecommons.org/licenses/by-nc-sa/3.0/us/
00006  * 
00007  * You are free:
00008  * 
00009  *    to Share - to copy, distribute, display, and perform the work
00010  *    to Remix - to make derivative works
00011  * 
00012  * Under the following conditions:
00013  * 
00014  *    Attribution. You must attribute the work in the manner specified by the
00015  *    author or licensor (but not in any way that suggests that they endorse you
00016  *    or your use of the work).
00017  * 
00018  *    Noncommercial. You may not use this work for commercial purposes.
00019  * 
00020  *    Share Alike. If you alter, transform, or build upon this work, you may
00021  *    distribute the resulting work only under the same or similar license to
00022  *    this one.
00023  * 
00024  * For any reuse or distribution, you must make clear to others the license
00025  * terms of this work. The best way to do this is by including this header.
00026  * 
00027  * Any of the above conditions can be waived if you get permission from the
00028  * copyright holder.
00029  * 
00030  * Apart from the remix rights granted under this license, nothing in this
00031  * license impairs or restricts the author's moral rights.
00032  */
00033 
00034 
00046 #ifndef REGRESS_H 
00047 #define REGRESS_H 
00048 
00049 
00050 #include <jwsc/config.h>
00051 
00052 #include <stdlib.h>
00053 #include <inttypes.h>
00054 
00055 #include "jwsc/base/error.h"
00056 #include "jwsc/vector/vector.h"
00057 #include "jwsc/matrix/matrix.h"
00058 
00059 
00060 #ifdef __cplusplus
00061 namespace jwsc {
00062 extern "C" {
00063 #endif
00064 
00065 
00066 #if defined JWSC_HAVE_LAPACK
00067 
00075 Error* linear_least_squares_regress_f
00076 (
00077     Vector_f**      w_out,
00078     const Matrix_f* x,
00079     const Vector_f* y
00080 );
00081 
00083 Error* linear_least_squares_regress_d
00084 (
00085     Vector_d**      w_out,
00086     const Matrix_d* x,
00087     const Vector_d* y
00088 );
00089 
00103 Error* linear_least_squares_ransac_regress_f
00104 (
00105     Vector_f**      w_out,
00106     const Matrix_f* x,
00107     const Vector_f* y,
00108     uint32_t        n,
00109     uint32_t        k,
00110     float           t,
00111     uint32_t        d
00112 );
00113 
00115 Error* linear_least_squares_ransac_regress_d
00116 (
00117     Vector_d**      w_out,
00118     const Matrix_d* x,
00119     const Vector_d* y,
00120     uint32_t        n,
00121     uint32_t        k,
00122     double          t,
00123     uint32_t        d
00124 );
00125 
00127 #endif
00128 
00129 
00130 #ifdef __cplusplus
00131 }
00132 }
00133 #endif
00134 
00135 
00136 #endif