pcb 4.1.1
An interactive printed circuit board layout editor.
|
Go to the source code of this file.
Defines | |
#define | COSALPHA2 0.999695413509 |
#define | SINALPHA2 3.04586490453e-4 |
Functions | |
GtsMatrix * | gts_matrix_new (gdouble a00, gdouble a01, gdouble a02, gdouble a03, gdouble a10, gdouble a11, gdouble a12, gdouble a13, gdouble a20, gdouble a21, gdouble a22, gdouble a23, gdouble a30, gdouble a31, gdouble a32, gdouble a33) |
void | gts_matrix_assign (GtsMatrix *m, gdouble a00, gdouble a01, gdouble a02, gdouble a03, gdouble a10, gdouble a11, gdouble a12, gdouble a13, gdouble a20, gdouble a21, gdouble a22, gdouble a23, gdouble a30, gdouble a31, gdouble a32, gdouble a33) |
GtsMatrix * | gts_matrix_projection (GtsTriangle *t) |
GtsMatrix * | gts_matrix_transpose (GtsMatrix *m) |
static gdouble | det2x2 (gdouble a, gdouble b, gdouble c, gdouble d) |
static gdouble | det3x3 (gdouble a1, gdouble a2, gdouble a3, gdouble b1, gdouble b2, gdouble b3, gdouble c1, gdouble c2, gdouble c3) |
gdouble | gts_matrix_determinant (GtsMatrix *m) |
static GtsMatrix * | adjoint (GtsMatrix *m) |
GtsMatrix * | gts_matrix_inverse (GtsMatrix *m) |
GtsMatrix * | gts_matrix3_inverse (GtsMatrix *m) |
void | gts_matrix_print (GtsMatrix *m, FILE *fptr) |
void | gts_vector_print (GtsVector v, FILE *fptr) |
void | gts_vector4_print (GtsVector4 v, FILE *fptr) |
guint | gts_matrix_compatible_row (GtsMatrix *A, GtsVector b, guint n, GtsVector A1, gdouble b1) |
guint | gts_matrix_quadratic_optimization (GtsMatrix *A, GtsVector b, guint n, GtsMatrix *H, GtsVector c) |
void | gts_matrix_destroy (GtsMatrix *m) |
GtsMatrix * | gts_matrix_product (GtsMatrix *m1, GtsMatrix *m2) |
GtsMatrix * | gts_matrix_zero (GtsMatrix *m) |
GtsMatrix * | gts_matrix_identity (GtsMatrix *m) |
GtsMatrix * | gts_matrix_scale (GtsMatrix *m, GtsVector s) |
GtsMatrix * | gts_matrix_translate (GtsMatrix *m, GtsVector t) |
GtsMatrix * | gts_matrix_rotate (GtsMatrix *m, GtsVector r, gdouble angle) |
#define COSALPHA2 0.999695413509 |
Definition at line 424 of file matrix.c.
Referenced by gts_matrix_compatible_row().
#define SINALPHA2 3.04586490453e-4 |
Definition at line 426 of file matrix.c.
Referenced by gts_matrix_compatible_row().
Definition at line 260 of file matrix.c.
References det3x3().
Referenced by gts_matrix_inverse().
static gdouble det2x2 | ( | gdouble | a, |
gdouble | b, | ||
gdouble | c, | ||
gdouble | d | ||
) | [static] |
static gdouble det3x3 | ( | gdouble | a1, |
gdouble | a2, | ||
gdouble | a3, | ||
gdouble | b1, | ||
gdouble | b2, | ||
gdouble | b3, | ||
gdouble | c1, | ||
gdouble | c2, | ||
gdouble | c3 | ||
) | [static] |
Definition at line 198 of file matrix.c.
References det2x2().
Referenced by adjoint(), and gts_matrix_determinant().
void gts_matrix_assign | ( | GtsMatrix * | m, |
gdouble | a00, | ||
gdouble | a01, | ||
gdouble | a02, | ||
gdouble | a03, | ||
gdouble | a10, | ||
gdouble | a11, | ||
gdouble | a12, | ||
gdouble | a13, | ||
gdouble | a20, | ||
gdouble | a21, | ||
gdouble | a22, | ||
gdouble | a23, | ||
gdouble | a30, | ||
gdouble | a31, | ||
gdouble | a32, | ||
gdouble | a33 | ||
) |
gts_matrix_assign: : a GtsMatrix. : element [0][0]. : element [0][1]. : element [0][2]. : element [0][3]. : element [1][0]. : element [1][1]. : element [1][2]. : element [1][3]. : element [2][0]. : element [2][1]. : element [2][2]. : element [2][3]. : element [3][0]. : element [3][1]. : element [3][2]. : element [3][3].
Set values of matrix elements.
gts_matrix_compatible_row: : a GtsMatrix. : a GtsVector.
: the number of previous constraints of .x=. : a GtsMatrix. : a GtsVector.
Given a system of
constraints .x=adds to it the compatible constraints defined by .x=. The compatibility is determined by insuring that the resulting system is well-conditioned (see Lindstrom and Turk (1998, 1999)).
Returns: the number of constraints of the resulting system.
Definition at line 443 of file matrix.c.
References COSALPHA2, gts_vector_cross, gts_vector_scalar, n, s, and SINALPHA2.
Referenced by gts_matrix_quadratic_optimization(), and gts_volume_optimized_vertex().
void gts_matrix_destroy | ( | GtsMatrix * | m | ) |
gts_matrix_destroy: : a GtsMatrix.
Free all the memory allocated for .
Definition at line 574 of file matrix.c.
Referenced by gts_volume_optimized_vertex().
gdouble gts_matrix_determinant | ( | GtsMatrix * | m | ) |
gts_matrix_determinant: : a GtsMatrix.
Returns: the value of det().
Definition at line 216 of file matrix.c.
References det3x3().
Referenced by gts_matrix_inverse().
gts_matrix_identity: : a GtsMatrix or NULL.
Initializes to an identity matrix. Allocates a matrix if is NULL.
Returns: the identity matrix.
Definition at line 633 of file matrix.c.
References gts_matrix_zero(), and m.
GtsMatrix* gts_matrix_new | ( | gdouble | a00, |
gdouble | a01, | ||
gdouble | a02, | ||
gdouble | a03, | ||
gdouble | a10, | ||
gdouble | a11, | ||
gdouble | a12, | ||
gdouble | a13, | ||
gdouble | a20, | ||
gdouble | a21, | ||
gdouble | a22, | ||
gdouble | a23, | ||
gdouble | a30, | ||
gdouble | a31, | ||
gdouble | a32, | ||
gdouble | a33 | ||
) |
gts_matrix_new: : element [0][0]. : element [0][1]. : element [0][2]. : element [0][3]. : element [1][0]. : element [1][1]. : element [1][2]. : element [1][3]. : element [2][0]. : element [2][1]. : element [2][2]. : element [2][3]. : element [3][0]. : element [3][1]. : element [3][2]. : element [3][3].
Allocates memory and initializes a new GtsMatrix.
Returns: a pointer to the newly created GtsMatrix.
Definition at line 46 of file matrix.c.
References m.
Referenced by gts_volume_optimized_vertex().
void gts_matrix_print | ( | GtsMatrix * | m, |
FILE * | fptr | ||
) |
gts_matrix_print: : a GtsMatrix. : a file descriptor.
Print to file .
Definition at line 375 of file matrix.c.
Referenced by gts_volume_optimized_vertex().
GtsMatrix* gts_matrix_projection | ( | GtsTriangle * | t | ) |
gts_matrix_projection: : a GtsTriangle.
Creates a new GtsMatrix representing the projection onto a plane of normal given by .
Returns: a pointer to the newly created GtsMatrix.
Definition at line 108 of file matrix.c.
References GTS_POINT, gts_triangle_vertices_edges(), and m.
guint gts_matrix_quadratic_optimization | ( | GtsMatrix * | A, |
GtsVector | b, | ||
guint | n, | ||
GtsMatrix * | H, | ||
GtsVector | c | ||
) |
gts_matrix_quadratic_optimization: : a GtsMatrix. : a GtsVector.
: the number of constraints (must be smaller than 3). : a symmetric positive definite Hessian. : a GtsVector.
Solve a quadratic optimization problem: Given a quadratic objective function f which can be written as: f(x) = x^t..x + ^t.x + k, where is the symmetric positive definite Hessian of f and k is a constant, find the minimum of f subject to the set of
prior linear constraints, defined by the first
rows of and (.x = ). The new constraints given by the minimization are added to and only if they are linearly independent as determined by gts_matrix_compatible_row().
Returns: the new number of constraints defined by and .
Definition at line 498 of file matrix.c.
References gts_matrix_compatible_row(), gts_vector_cross, gts_vector_scalar, max, and n.
Referenced by gts_volume_optimized_vertex().
gts_matrix_scale: : a GtsMatrix or NULL. : the scaling vector.
Initializes to a scaling matrix for . Allocates a matrix if is NULL.
Returns: the scaling matrix.
Definition at line 650 of file matrix.c.
References gts_matrix_zero(), and m.
gts_matrix_translate: : a GtsMatrix or NULL. : the translation vector.
Initializes to a translation matrix for . Allocates a new matrix if is NULL.
Returns: the translation matix.
Definition at line 670 of file matrix.c.
References gts_matrix_zero(), and m.
gts_matrix_zero: : a GtsMatrix or $NULL.
Initializes to zeros. Allocates a matrix if is NULL.
Returns: the zero'ed matrix.
Definition at line 612 of file matrix.c.
References m.
Referenced by gts_matrix_identity(), gts_matrix_scale(), gts_matrix_translate(), and gts_volume_optimized_vertex().
void gts_vector4_print | ( | GtsVector4 | v, |
FILE * | fptr | ||
) |
gts_vector4_print: : a GtsVector4. : a file descriptor.
Print to file .
void gts_vector_print | ( | GtsVector | v, |
FILE * | fptr | ||
) |
gts_vector_print: : a GtsVector. : a file descriptor.
Print to file .
Definition at line 398 of file matrix.c.
Referenced by gts_volume_optimized_vertex().