/* partition.h - Routines to help handle partitioned matrices.
* © Copyright 1999 by John Halleck
* All rights reserved.
*/
/* Version of September 6th, 1999 */
/* These routines support some basic operations needed for matrix
* partitioning. You can extract or place a submatrix, or you
* can add or subtract a part of a matrix.
*/
#ifndef PARTITION
#define PARTITION 1
#include "errors.h"
/* We return package standard error codes. */
/* All of the routines can return:
* ERRnil - You can't pass nil pointers to the routines.
* ERRsize - Matrices have to have positive numbers of rows and columns.
* ERRrange - The indices were out of range.
* ERRsame - The arrays have to be distinct arrays.
*/
#include "mat.h"
/* What does a matrix look like? */
/* -------------- Routines ---------------------------- */
/* Embed one matrix into another */
extern error matembed (int rows, int cols, matrix result,
int rowsfrom, int colsfrom, matrix from,
int atrow, int atcol);
/* Extract one matrix from another */
extern error matextract (int rows, int cols, matrix result,
int rowsfrom, int colsfrom, matrix from,
int offsetrow, int offsetcol);
/* Add a matrix to a section of another. */
extern error partadd (int rows, int cols, matrix result,
int rowsfrom, int colsfrom, matrix from,
int offsetrow, int offsetcol);
/* subtract a matrix from a section of another. */
extern error partsub (int rows, int cols, matrix result,
int rowsfrom, int colsfrom, matrix from,
int offsetrow, int offsetcol);
#endif
This page is http://www.cc.utah.edu/~nahaj/cave/survey/code/c/partition.h.html
© Copyright 2000 by John Halleck, All Rights Reserved.
This snapshot was last modified on August 23rd, 2000
And the underlying file was last modified on May 11th, 2000