gpp4 1.3.1
Functions
src/cvecmat.c File Reference

C library for vector and matrix manipulations. More...

#include <math.h>
#include "cvecmat.h"

Functions

void ccp4_dcross (const double a[3], const double b[3], double c[3])
void ccp4_3matmul (double c[3][3], const double a[3][3], const double b[3][3])
void ccp4_4matmul (float c[4][4], const float a[4][4], const float b[4][4])
double invert3matrix (const double a[3][3], double ai[3][3])
float invert4matrix (const float a[4][4], float ai[4][4])
float ccp4_pow_ii (const float base, const int power)

Detailed Description

C library for vector and matrix manipulations.

Author:
Martyn Winn

Function Documentation

void ccp4_3matmul ( double  c[3][3],
const double  a[3][3],
const double  b[3][3] 
)

3x3 matrix product This function computes the matrix product between two 3x3 matrices.

Parameters:
[out]cmatrix product
[in]aleft matrix
[in]bright matrix

Referenced by ccp4uc_fracu_to_orthu(), and ccp4uc_orthu_to_fracu().

void ccp4_4matmul ( float  c[4][4],
const float  a[4][4],
const float  b[4][4] 
)

4x4 matrix product. This function computes the matrix product between two 4x4 matrices.

Parameters:
[out]cmatrix product
[in]aleft matrix
[in]bright matrix

Referenced by ccp4spg_load_spacegroup().

void ccp4_dcross ( const double  a[3],
const double  b[3],
double  c[3] 
)

Vector cross product This function computes the vector cross product c = a X b

Parameters:
[in]avector 1
[in]bvector 2
[out]ccross product vector

Referenced by invert3matrix().

float ccp4_pow_ii ( const float  base,
const int  power 
)

Compute powers. This function computes powers of any base to any integer power.

Parameters:
[in]base
[in]power
Returns:
result of power calculation

Referenced by invert4matrix().

double invert3matrix ( const double  a[3][3],
double  ai[3][3] 
)

3x3 matrix inversion.

Parameters:
[in]a3*3 matrix to be inverted
[out]aiinverse matrix
Returns:
Determinant

References ccp4_dcross().

Referenced by ccp4uc_frac_orth_mat().

float invert4matrix ( const float  a[4][4],
float  ai[4][4] 
)

4x4 matrix inversion.

Parameters:
[in]a4x4 matrix to be inverted
[out]aiinverse matrix
Returns:
Determinant

References ccp4_pow_ii().

Referenced by ccp4_symop_invert(), and ccp4spg_load_spacegroup().