#include <stdlib.h>
#include "magic/mmath.h"
#include "magic/mcoord.h"
#include "magic/mmagisupp.h"
Go to the source code of this file.
Functions | |
BEGIN_NAMESPACE (MagiC) | |
double | sum (const Vector &x) |
double | min (const Vector &x) |
int | minIndex (const Vector &x) |
double | max (const Vector &x) |
int | maxIndex (const Vector &x) |
double | avg (const Vector &x) |
double | stddev (const Vector &x) |
double | stdmerr (const Vector &x) |
Vector | histogram (const Vector &x, int n) |
void | add (Vector &x, double a) |
void | multiply (Vector &x, double m) |
void | multiplyToUnity (Vector &x) |
Definition in file mmath.cc.
|
Adds a value to the Vector .
Definition at line 112 of file mmath.cc. References PackArray::size(). Referenced by multiplyToUnity(). |
|
Average of the values in Vector x.
Definition at line 58 of file mmath.cc. References PackArray::size(), and sum(). Referenced by stddev(). |
|
This file is part of the MagiC++ library. * * Copyright (C) 1998-2002 Marko Grönroos <magi@iki.fi> * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; see the file COPYING.LIB. If * not, write to the Free Software Foundation, Inc., 59 Temple Place *
|
|
Creates a histogram with n slots of the values in the Vector.
Definition at line 74 of file mmath.cc. References PackArray::make(), max(), min(), and PackArray::size(). |
|
Largest value in Vector x.
Definition at line 39 of file mmath.cc. References is_undef(), max(), and PackArray::size(). Referenced by histogram(), max(), and maxIndex(). |
|
The index of the largest value in Vector x.
Definition at line 47 of file mmath.cc. References is_undef(), max(), and PackArray::size(). |
|
Lowest value in Vector x.
Definition at line 20 of file mmath.cc. References is_undef(), min(), and PackArray::size(). Referenced by histogram(), min(), and minIndex(). |
|
The index of the lowest value in Vector x.
Definition at line 28 of file mmath.cc. References is_undef(), min(), and PackArray::size(). |
|
Multiplies the values in the Vector with a coefficient.
Definition at line 117 of file mmath.cc. References PackArray::size(). Referenced by multiplyToUnity(). |
|
Multiplies the values in the Vector so that they sum to 1.0.
Definition at line 122 of file mmath.cc. References add(), multiply(), PackArray::size(), and sum(). |
|
Standard deviation of the values in Vector x.
Definition at line 62 of file mmath.cc. References avg(), and PackArray::size(). Referenced by stdmerr(). |
|
Standard error of the values in Vector x.
Definition at line 70 of file mmath.cc. References PackArray::size(), and stddev(). |
|
Sum of values in Vector x.
Definition at line 13 of file mmath.cc. References PackArray::size(). Referenced by avg(), Matrix::multiplyToSum(), and multiplyToUnity(). |