aprod.cpp
来自「一个画有向图的程序。里面含有力导引画图算法等多个经典算法。」· C++ 代码 · 共 43 行
CPP
43 行
/* This software was developed by Bruce Hendrickson and Robert Leland *
* at Sandia National Laboratories under US Department of Energy *
* contract DE-AC04-76DP00789 and is copyrighted by Sandia Corporation. */
#include <stdio.h>
#include "..\structs.h"
#include "orthog.h"
#include "utils_rqi.h"
int aprod_(
long *lnvtxs,
double *x,
double *y,
double *dA,
double *vwsqrt,
double *work,
double *dorthlist /* vectors to orthogonalize against */
)
{
int nvtxs; /* int copy of long_nvtxs */
struct vtx_data **A;
struct orthlink *orthlist; /* vectors to orthogonalize against */
nvtxs = (int) *lnvtxs;
A = (struct vtx_data **) dA;
orthlist = (struct orthlink *) dorthlist;
/* The offset on x and y is because the arrays come originally from Fortran
declarations which index from 1 */
splarax(y - 1, A, nvtxs, x - 1, vwsqrt, work - 1);
/* Now orthogonalize against lower eigenvectors. */
if (vwsqrt == NULL)
orthog1(y - 1, 1, nvtxs);
else
orthogvec(y - 1, 1, nvtxs, vwsqrt);
orthogonalize(y - 1, nvtxs, orthlist);
return (0);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?