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

📄 utils_rqi.h

📁 一个画有向图的程序。里面含有力导引画图算法等多个经典算法。
💻 H
字号:
#ifndef _UTILS_RQI_H_
#define _UTILS_RQI_H_

#include	"..\defs.h"
#include	"..\structs.h"
#include <stdio.h>



/* Returns scalar product of two double n-vectors. */
double    dot(double   *vec1,int beg, int end, double  *vec2);

/* Returns 2-norm of a double n-vector over range. */
double    norm(double *vec, int beg, int end);

/* Sparse linked A(matrix) times x(vector), double precision. */
void      splarax(
					double   *result,		/* result of matrix vector multiplication */
					struct    vtx_data **mat,	/* graph data structure */
					int       n,			/* number of rows/columns in matrix */
					double   *vec,			/* vector being multiplied by matrix */
					double   *vwsqrt,		/* square roots of vertex weights */
					double   *work		/* work vector from 1-n */
				);

/* Scaled add - fills double vec1 with vec1 + alpha*vec2 over range*/
void      scadd(double   *vec1, int  beg, int end, double fac, double   *vec2);


/* Scale - fills vec1 with alpha*vec2 over range, double version */
void      vecscale(double   *vec1, int beg, int end, double alpha, double *vec2);

/* Print a double precision number with filtering format to file. */
void      doubleout_file(
						FILE     *outfile,              /* output file if not NULL */
						double    number,		/* argument to print */
						int       mode 			/* currently just one */
						);

/* Normalizes a double n-vector over range. */
double    normalize(double *vec, int beg, int end);

#endif

⌨️ 快捷键说明

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