A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/nlm__linear__algebra_8c_source.html below:

NCBI C++ ToolKit: src/algo/blast/composition_adjustment/nlm_linear_algebra.c Source File

Go to the documentation of this file.

Go to the SVN repository for this file.

45

mat = (

double

**)

calloc

(nrows,

sizeof

(

double

*));

47

mat[0] = (

double

*)

malloc

((

size_t

) nrows *

48

(size_t) ncols *

sizeof

(

double

));

49  if

(mat[0] !=

NULL

) {

50  for

(

i

= 1;

i

< nrows;

i

++) {

51

mat[

i

] = &mat[0][

i

* ncols];

70

nelts = ((size_t)

n

* (

n

+ 1))/2;

72

L = (

double

**)

calloc

(

n

,

sizeof

(

double

*));

74

L[0] = (

double

*)

malloc

(nelts *

sizeof

(

double

));

76  for

(

i

= 1;

i

<

n

;

i

++) {

77

L[

i

] = L[

i

- 1] +

i

;

106

mat = (

int

**)

calloc

(nrows,

sizeof

(

int

*));

108

mat[0] = (

int

*)

malloc

((

size_t

) nrows *

109

(size_t) ncols *

sizeof

(

int

));

110  if

(mat[0] !=

NULL

) {

111  for

(

i

= 1;

i

< nrows;

i

++) {

112

mat[

i

] = &mat[0][

i

* ncols];

143  for

(

i

= 0;

i

<

n

;

i

++) {

144  for

(j = 0; j <

i

; j++) {

146  for

(k = 0; k < j; k++) {

147

temp -=

A

[

i

][k] *

A

[j][k];

149  A

[

i

][j] = temp/

A

[j][j];

152  for

(k = 0; k <

i

; k++) {

153

temp -=

A

[

i

][k] *

A

[

i

][k];

155  A

[

i

][

i

] = sqrt(temp);

171  for

(

i

= 0;

i

<

n

;

i

++) {

173  for

(j = 0; j <

i

; j++) {

174

temp -= L[

i

][j] * x[j];

176

x[

i

] = temp/L[

i

][

i

];

179  for

(j =

n

- 1; j >= 0; j--) {

181  for

(

i

= 0;

i

< j;

i

++) {

182

x[

i

] -= L[j][

i

] * x[j];

197  for

(

i

= 0;

i

<

n

;

i

++) {

199  double

absvi =

fabs

(v[

i

]);

201

sum = 1.0 + sum * (scale/absvi) * (scale/absvi);

204

sum += (absvi/scale) * (absvi/scale);

208  return

scale * sqrt(sum);

217  for

(

i

= 0;

i

<

n

;

i

++) {

218

y[

i

] += alpha * x[

i

];

230  for

(

i

= 0;

i

<

n

;

i

++) {

233

alpha_i = -x[

i

] / step_x[

i

];

234  if

(alpha_i >= 0 && alpha_i < alpha) {

Type and macro definitions from C toolkit that are not defined in C++ toolkit.

double ** Nlm_DenseMatrixNew(int nrows, int ncols)

Create and return a new, dense matrix.

void Nlm_DenseMatrixFree(double ***mat)

Free a matrix created by Nlm_DenseMatrixNew or Nlm_LtriangMatrixNew.

double Nlm_EuclideanNorm(const double v[], int n)

Compute the Euclidean norm (2-norm) of a vector.

void Nlm_SolveLtriangPosDef(double x[], int n, double **L)

Solve the linear system , where L is a non-singular lower triangular matrix, usually computed using t...

void Nlm_FactorLtriangPosDef(double **A, int n)

Accessing only the lower triangular elements of the symmetric, positive definite matrix A,...

void Nlm_AddVectors(double y[], int n, double alpha, const double x[])

Let y = y + alpha * x.

void Nlm_Int4MatrixFree(int ***mat)

Free a matrix created by Nlm_DenseMatrixNew or Nlm_LtriangMatrixNew.

double ** Nlm_LtriangMatrixNew(int n)

Create and return a new, dense, lower-triangular matrix.

int ** Nlm_Int4MatrixNew(int nrows, int ncols)

Create and return a new Int4 matrix.

double Nlm_StepBound(const double x[], int n, const double step_x[], double max)

Given a nonnegative vector x and a nonnegative scalar max, returns the largest value in [0,...

Declarations for several linear algebra routines.

voidp calloc(uInt items, uInt size)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4