00001 /********************************************************************* 00002 LWPR: A library for incremental online learning 00003 Copyright (C) 2007 Stefan Klanke, Sethu Vijayakumar 00004 Contact: sethu.vijayakumar@ed.ac.uk 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Lesser General Public 00008 License as published by the Free Software Foundation; either 00009 version 2.1 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Lesser General Public 00017 License along with this library; if not, write to the Free 00018 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00019 *********************************************************************/ 00020 00021 00027 #ifndef __LWPR_MATH_H 00028 #define __LWPR_MATH_H 00029 00030 #ifdef __cplusplus 00031 extern "C" { 00032 #endif 00033 00034 00041 double lwpr_math_norm2(const double *x, int n); 00042 00050 double lwpr_math_dot_product(const double *a,const double *b,int n); 00051 00052 00062 void lwpr_math_scalar_vector(double *y, double a,const double *x,int n); 00063 00073 void lwpr_math_add_scalar_vector(double *y, double a,const double *x,int n); 00074 00086 void lwpr_math_scale_add_scalar_vector(double b, double *y, double a,const double *x,int n); 00087 00107 int lwpr_math_cholesky(int N,int Ns,double *R,const double *A); 00108 00109 #ifdef __cplusplus 00110 } 00111 #endif 00112 00113 #endif