Main Page   Compound List   File List   File Members  

spOutput.c File Reference

#include <stdio.h>
#include "spConfig.h"
#include "spMatrix.h"
#include "spDefs.h"

Functions

void spPrint (spMatrix eMatrix, int PrintReordered, int Data, int Header)
int spFileMatrix (spMatrix eMatrix, char *File, char *Label, int Reordered, int Data, int Header)
int spFileVector (spMatrix eMatrix, char *File, spREAL RHS[])
int spFileStats (spMatrix eMatrix, char *File, char *Label)

Detailed Description

This file contains the output-to-file and output-to-screen routines for the matrix package.

Objects that begin with the spc prefix are considered private and should not be used.

Author:
Kenneth S. Kundert <kundert@users.sourceforge.net>

Function Documentation

int spFileMatrix spMatrix    eMatrix,
char *    File,
char *    Label,
int    Reordered,
int    Data,
int    Header
 

Writes matrix to file in format suitable to be read back in by the matrix test program.

Returns :
One is returned if routine was successful, otherwise zero is returned. The calling function can query errno (the system global error variable) as to the reason why this routine failed.
Parameters:
eMatrix  Pointer to matrix.
File  Name of file into which matrix is to be written.
Label  String that is transferred to file and is used as a label.
Reordered  Specifies whether matrix should be output in reordered form, or in original order.
Data  Indicates that the element values should be output along with the indices for each element. This parameter must be true if matrix is to be read by the sparse test program.
Header  Indicates that header is desired. This parameter must be true if matrix is to be read by the sparse test program.

int spFileStats spMatrix    eMatrix,
char *    File,
char *    Label
 

Writes useful information concerning the matrix to a file. Should be executed after the matrix is factored.

Returns :
One is returned if routine was successful, otherwise zero is returned. The calling function can query errno (the system global error variable) as to the reason why this routine failed.
Parameters:
eMatrix  Pointer to matrix.
File  Name of file into which matrix is to be written.
Label  String that is transferred to file and is used as a label.

int spFileVector spMatrix    eMatrix,
char *    File,
spREAL    RHS[]
 

Writes vector to file in format suitable to be read back in by the matrix test program. This routine should be executed after the function spFileMatrix.

Returns :
One is returned if routine was successful, otherwise zero is returned. The calling function can query errno (the system global error variable) as to the reason why this routine failed.
Parameters:
eMatrix  Pointer to matrix.
File  Name of file into which matrix is to be written.
RHS  Right-hand side vector. This is only the real portion if spSEPARATED_COMPLEX_VECTORS is true.
iRHS  Right-hand side vector, imaginary portion. Not necessary if matrix is real or if spSEPARATED_COMPLEX_VECTORS is set false. iRHS is a macro that replaces itself with `, iRHS' if the options spCOMPLEX and spSEPARATED_COMPLEX_VECTORS are set, otherwise it disappears without a trace.

void spPrint spMatrix    eMatrix,
int    PrintReordered,
int    Data,
int    Header
 

Formats and send the matrix to standard output. Some elementary statistics are also output. The matrix is output in a format that is readable by people.

Parameters:
eMatrix  Pointer to matrix.
PrintReordered  Indicates whether the matrix should be printed out in its original form, as input by the user, or whether it should be printed in its reordered form, as used by the matrix routines. A zero indicates that the matrix should be printed as inputed, a one indicates that it should be printed reordered.
Data  Boolean flag that when false indicates that output should be compressed such that only the existence of an element should be indicated rather than giving the actual value. Thus 11 times as many can be printed on a row. A zero signifies that the matrix should be printed compressed. A one indicates that the matrix should be printed in all its glory.
Header  Flag indicating that extra information should be given, such as row and column numbers.


Generated on Mon Jun 30 12:01:29 2003 for Sparse by doxygen1.2.17