00001 /*************************************************************************** 00002 linalg.cpp - description 00003 ------------------- 00004 begin : Mon Feb 9 2004 00005 copyright : (C) 2004 by Roman Geus 00006 email : roman.geus@psi.ch 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #include "linalg.h" 00019 00020 namespace linalg { 00021 00022 long double norm_frobenius(const Matrix<long double>& A) { 00023 return sqrtl(squared_sum(A)); 00024 } 00025 00026 double norm_frobenius(const Matrix<double>& A) { 00027 return sqrt(squared_sum(A)); 00028 } 00029 00030 float norm_frobenius(const Matrix<float>& A) { 00031 return sqrtf(squared_sum(A)); 00032 } 00033 00034 }