⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vector.h

📁 一个通用的隐性马尔可夫C代码库 开发环境:C语言 简要说明:这是一个通用的隐性马尔可夫C代码库
💻 H
字号:
/*******************************************************************************  author       : Bernhard Knab  filename     : ghmm/ghmm/vector.h  created      : TIME: 17:46:40     DATE: Thu 18. February 1999  $Id: vector.h,v 1.7 2002/04/03 11:17:22 pipenb Exp $Copyright (C) 1998-2001, ZAIK/ZPR, Universit鋞 zu K鰈nThis program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*******************************************************************************/#ifndef VECTOR_H#define VECTOR_H#ifdef __cplusplusextern "C" {#endif#include <stdio.h>/**@name Vektor-Funktionen *//*@{ (Doc++-Group: vector) *//**  Scales the sum of elements in a vector to one.  @return 0 for success; -1 for error  @param v    vector  @param len  length of the vector       */int vector_normalize(double *v, int len);/**  Gives all elements in a vector a constant value  @param v    vector  @param len  length of the vector  @param c    given value for the elements*/void vector_const_values(double *v, int len, double c);/**  Gives all elements, not equal zero, in a vector a constant value  @param v    vector  @param len  length of the vector  @param c    given value for the elements*/void vector_const_preserve_struct(double *v, int len, double c);/**  Gives all elements in a vector random values between 0 and 1  @param v    vector  @param len  length of the vector       */void vector_random_values(double *v, int len);/**  Gives all elements, not equal zero, in a vector random values between 0 and 1  @param v    vector  @param len  length of the vector   */void vector_random_preserve_struct(double *v, int len);/**  Writes a double vector (without parenthesis)  @param file       output file  @param vector     vector to write  @param len        dimension  @param tab        format: leading tabs  @param separator  format: separator for columns  @param ending     format: end of a row    */void vector_d_print(FILE *file, double *vector, int len, 		    char *tab, char *separator, char *ending);/**  Writes a double vector (without parenthesis) with given number of decimal places  @param file       output file  @param vector     vector to write  @param len        dimension  @param width      format: total number of decimal places  @param prec       format: number of decimal places after the comma  @param tab        format: leading tabs  @param separator  format: separator for columns  @param ending     format: end of a row   */void vector_d_print_prec(FILE *file, double *vector, int len, int width,			 int prec, char *tab, char *separator, char *ending);/**  Writes an integer vector (without parenthesis)  @param file       output file  @param vector     vector to write  @param len        dimension  @param tab        format: leading tabs  @param separator  format: separator for columns  @param ending     format: end of a row    */void vector_i_print(FILE *file, int *vector, int len,		    char *tab, char *separator, char *ending);/**  Calculates Ax, where A is a double matrix and x a double vector  @param A       n x m matrix  @param x       vector to calculate  @param n       number of rows  @param m       number of columns  @param v       calculated vector (return value)  */int vector_mat_times_vec(double ** A, double *x, int n, int m, double *v);#ifdef __cplusplus}#endif#endif /* VECTOR_H *//*@} (Doc++-Group: vector) */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -