Main Page | Modules | Class List | File List | Class Members | File Members

4vector.c File Reference

#include <math.h>
#include <gandalf/linalg/3vector.h>
#include <gandalf/linalg/4vector.h>
#include <gandalf/common/misc_defs.h>
#include <gandalf/common/misc_error.h>
#include <string.h>
#include <gandalf/common/endian_io.h>

Functions

Gan_Bool gan_vec4_print (const Gan_Vector4 *p, const char *prefix, int indent, const char *fmt)
 Print fixed size vector to standard output.
Gan_Bool gan_vec4_fwrite (FILE *fp, const Gan_Vector4 *p, gan_uint32 magic_number)
 Write fixed size vector to file stream.
Gan_Bool gan_vec4_fread (FILE *fp, Gan_Vector4 *p, gan_uint32 *magic_number)
 Read fixed size vector from file stream.
Gan_Vector4 gan_vec4_zero_s (void)
 Set fixed size vector to zero.
Gan_Vector4 gan_vec4_copy_s (const Gan_Vector4 *x)
 Return a copy of fixed size vector.
Gan_Vector4 gan_vec4_scale_s (const Gan_Vector4 *x, const double a)
 Scale fixed size vector.
Gan_Vector4 gan_vec4_divide_s (const Gan_Vector4 *x, const double a)
 Divide fixed size vector by scalar.
Gan_Vector4 gan_vec4_negate_s (const Gan_Vector4 *x)
 Negate fixed size vector.
Gan_Vector4gan_vec4_unit_q (Gan_Vector4 *x, Gan_Vector4 *y)
 Scale matrix to unit norm.
Gan_Vector4 gan_vec4_unit_s (const Gan_Vector4 *x)
 Scale matrix to unit norm.
Gan_Vector4 gan_vec4_add_s (const Gan_Vector4 *x, const Gan_Vector4 *y)
 Add two fixed size vectors.
Gan_Vector4 gan_vec4_sub_s (const Gan_Vector4 *x, const Gan_Vector4 *y)
 Subtract two fixed size vectors.
double gan_vec4_dot_s (const Gan_Vector4 *p, const Gan_Vector4 *q)
 Dot product of fixed size vectors.
double gan_vec4_sqrlen_s (const Gan_Vector4 *p)
 Returns sum of squares of vector elements.
Gan_Vector4 gan_vec4_from_vec_s (const Gan_Vector *x)
 Convert generic rectangular vector to fixed size vector structure.
Gan_Bool gan_vec4_fprint (FILE *fp, const Gan_Vector4 *p, const char *prefix, int indent, const char *fmt)
 Print 4-vector to file.
Gan_Bool gan_vec4_fscanf (FILE *fp, Gan_Vector4 *p, char *prefix, int prefix_len)
 Read 4-vector from file.
Gan_Vector4 gan_vec4_fill_s (double X, double Y, double Z, double W)
 Return 4-vector filled with values.
Gan_Vector3 gan_vec4_get_v3t_s (const Gan_Vector4 *p)
 Extract top 3-vector part of 4-vector.
Gan_Vector4 gan_vec4_set_parts_s (const Gan_Vector3 *q, double s)
 Build 4-vector from 3-vector and scalar.
Gan_Vector4 gan_vec4_set_blocks_s (const Gan_Vector2 *q, const Gan_Vector2 *r)
 Macro: Build 4-vector from two 2-vectors.
Gan_Vector4gan_vec4_from_vec_q (const Gan_Vector *x, Gan_Vector4 *a)
 Convert generic vector to 4-vector structure.

Detailed Description

Module: Size 4 vectors (double precision)

Part of: Gandalf Library

Version:
1.21
Date:
2004/03/18 18:26:20
Author:
pm
Copyright: (c) 2000 Imagineer Software Limited
Generated on Fri Mar 17 12:44:49 2006 by  doxygen 1.3.9.1