Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 0e54ba0ee564ce6063a5e83aa86060c5 > files > 231

festival-speechtools-devel-1.2.96-18.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>
   <TITLE>template<class T> class  EST_TMatrix</TITLE>
   <META NAME="GENERATOR" CONTENT="DOC++ 3.4.6">
</HEAD>
 <body bgcolor="#ffffff" link="#0000ff" 
	vlink="#dd0000" text="#000088" alink="9000ff">

<A HREF = "http://www.cstr.ed.ac.uk/">
   <IMG align=left BORDER=0 SRC = "cstr.gif"></A> 
<A HREF="http://www.cstr.ed.ac.uk/projects/speech_tools.html">
	<IMG BORDER=0 ALIGN=right SRC="est.jpg" width=150 height=93></A>
<br>

<br clear=left>
<p align=right>

In file ../include/EST_TMatrix.h:<TABLE BORDER=0><TR>
<TD VALIGN=TOP><H2>template&lt;class T&gt; class  <A HREF="#DOC.DOCU">EST_TMatrix</A></H2></TD></H2></TD></TR></TABLE>
<BLOCKQUOTE>Template Matrix class.</BLOCKQUOTE>
<HR>

<H2>Inheritance:</H2>
<APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=65>
<param name=classes value="CEST_TVector,MEST_TVector.html,CEST_TMatrix,MEST_TMatrix.html">
<param name=before value="M,M">
<param name=after value="Md_,M">
<param name=indent value="0,1">
<param name=arrowdir value="down">
</APPLET>
<HR>

<DL>
<P><TABLE>
<DT><H3>Public Methods</H3><DD><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.9"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_TMatrix</B> ()<BR>
<I>default constructor</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.10"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_TMatrix</B> (const <!1><A HREF="EST_TMatrix.html#DOC.14.10">EST_TMatrix</A>&lt;T&gt; &amp;m)<BR>
<I>copy constructor</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.11"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_TMatrix</B> (int rows, int cols)<BR>
<I>"size" constructor</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.12"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_TMatrix</B> (int rows, int cols, T* <!1><A HREF="EST_TVector.html#DOC.15.1.19">memory</A>, int offset=0, int free_when_destroyed=0)<BR>
<I>construct from memory supplied by caller</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.13"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>~EST_TMatrix</B> ()<BR>
<I>EST_TMatrix</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.14"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>access</B> <BR>
<I></I>
<P><TABLE>
<TR>
<TD VALIGN=TOP><A HREF="#DOC.14.14.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>int </TD><TD><B>num_rows</B> () const <BR>
<I>return number of rows</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.14.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>int </TD><TD><B>num_columns</B> () const <BR>
<I>return number of columns</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.14.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>INLINE const T&amp; </TD><TD><B>a_no_check</B> (int <!1><A HREF="EST_TMatrix.html#DOC.14.19.1">row</A>, int <!1><A HREF="EST_Token.html#DOC.9.12">col</A>) const <BR>
<I>const access with no bounds check, care recommend</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.14.4"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>INLINE T&amp; </TD><TD><B>a_no_check</B> (int <!1><A HREF="EST_TMatrix.html#DOC.14.19.1">row</A>, int <!1><A HREF="EST_Token.html#DOC.9.12">col</A>)<BR>
<I>access with no bounds check, care recommend</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.14.5"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>const T&amp; </TD><TD><B>a_check</B> (int <!1><A HREF="EST_TMatrix.html#DOC.14.19.1">row</A>, int <!1><A HREF="EST_Token.html#DOC.9.12">col</A>) const <BR>
<I>const element access function </I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.14.6"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>T&amp; </TD><TD><B>a_check</B> (int <!1><A HREF="EST_TMatrix.html#DOC.14.19.1">row</A>, int <!1><A HREF="EST_Token.html#DOC.9.12">col</A>)<BR>
<I>non-const element access function </I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.14.7"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>const T&amp; </TD><TD><B>operator () </B> (int <!1><A HREF="EST_TMatrix.html#DOC.14.19.1">row</A>, int <!1><A HREF="EST_Token.html#DOC.9.12">col</A>) const <BR>
<I>const element access operator</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.14.8"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>T&amp; </TD><TD><B>operator () </B> (int <!1><A HREF="EST_TMatrix.html#DOC.14.19.1">row</A>, int <!1><A HREF="EST_Token.html#DOC.9.12">col</A>)<BR>
<I>non-const element access operator</I>
</TD></TR></TABLE></P>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.15"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>resize</B> (int rows, int cols, int <!1><A HREF="set.html">set</A>=1)<BR>
<I>resize matrix.</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.16"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>fill</B> (const T &amp;<!1><A HREF="EST_Hash_Pair.html#DOC.91.2.2">v</A>)<BR>
<I>fill matrix with value v</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.17"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="EST_TMatrix.html">EST_TMatrix</A>&amp; </TD><TD><B>operator=</B> (const <!1><A HREF="EST_TMatrix.html">EST_TMatrix</A> &amp;s)<BR>
<I>assignment operator</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.18"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="EST_TMatrix.html">EST_TMatrix</A>&amp; </TD><TD><B>add_rows</B> (const <!1><A HREF="EST_TMatrix.html">EST_TMatrix</A> &amp;s)<BR>
<I>The two versions of what might have been operator +=</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.19"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Sub-Matrix/Vector Extraction</B> <BR>
<I></I>
<P><TABLE>
<TR>
<TD VALIGN=TOP><A HREF="#DOC.14.19.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>row</B> (<!1><A HREF="EST_TVector.html">EST_TVector</A>&lt;T&gt; &amp;rv, int r, int start_c=0, int len=-1)<BR>
<I>Make the vector <TT>rv</TT> a window onto row <TT>r</TT></I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.19.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>column</B> (<!1><A HREF="EST_TVector.html">EST_TVector</A>&lt;T&gt; &amp;cv, int c, int start_r=0, int len=-1)<BR>
<I>Make the vector <TT>cv</TT> a window onto column <TT>c</TT></I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.19.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>sub_matrix</B> (<!1><A HREF="EST_TMatrix.html">EST_TMatrix</A>&lt;T&gt; &amp;sm, int r=0, int numr=EST_ALL, int c=0, int numc=EST_ALL)<BR>
<I>Make the matrix <TT>sm</TT> a window into this matrix</I>
</TD></TR></TABLE></P>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.20"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Copy in and out</B> <BR>
<I></I>
<P><TABLE>
<TR>
<TD VALIGN=TOP><A HREF="#DOC.14.20.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>copy_row</B> (int r, T* buf, int offset=0, int num=-1) const <BR>
<I>Copy row <TT>r</TT> of matrix to <TT>buf</TT>.</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.20.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>copy_row</B> (int r, <!1><A HREF="EST_TVector.html">EST_TVector</A>&lt;T&gt; &amp;<!1><A HREF="EST_Wave.html#DOC.81.4.5">t</A>, int offset=0, int num=-1) const <BR>
<I>Copy row &lt;parameter&gt;r&lt;/parameter&gt; of matrix to &lt;parameter&gt;buf&lt;/parameter&gt;.</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.20.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>copy_column</B> (int c, T* buf, int offset=0, int num=-1) const <BR>
<I>Copy column <TT>c</TT> of matrix to <TT>buf</TT>.</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.20.4"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>copy_column</B> (int c, <!1><A HREF="EST_TVector.html">EST_TVector</A>&lt;T&gt; &amp;<!1><A HREF="EST_Wave.html#DOC.81.4.5">t</A>, int offset=0, int num=-1) const <BR>
<I>Copy column &lt;parameter&gt;c&lt;/parameter&gt; of matrix to &lt;parameter&gt;buf&lt;/parameter&gt;.</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.20.5"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set_row</B> (int <!1><A HREF="EST_TVector.html#DOC.15.1.20.3">n</A>, const T* buf, int offset=0, int num=-1)<BR>
<I>Copy buf into row <TT>n</TT> of matrix.</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.20.6"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set_column</B> (int <!1><A HREF="EST_TVector.html#DOC.15.1.20.3">n</A>, const T* buf, int offset=0, int num=-1)<BR>
<I>Copy buf into column <TT>n</TT> of matrix.</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.20.7"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set_memory</B> (T* buffer, int offset, int rows, int columns, int free_when_destroyed=0)<BR>
<I>For when you absolutely have to have access to the memory</I>
</TD></TR></TABLE></P>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.21"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>io</B> <BR>
<I></I>
<P><TABLE>
<TR>
<TD VALIGN=TOP><A HREF="#DOC.14.21.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="EST_read_status.html">EST_read_status</A> </TD><TD><B>load</B> (const class <!1><A HREF="EST_String.html">EST_String</A> &amp;<!1><A HREF="EST_TokenStream.html#DOC.10.7.9">filename</A>)<BR>
<I>load Matrix from file - Not currently implemented</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.21.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="EST_write_status.html">EST_write_status</A> </TD><TD><B>save</B> (const class <!1><A HREF="EST_String.html">EST_String</A> &amp;<!1><A HREF="EST_TokenStream.html#DOC.10.7.9">filename</A>) const <BR>
<I>save Matrix to file <TT>filename</TT></I>
</TD></TR></TABLE></P>
</TD></TR></TABLE></P>

<P><TABLE>
<DT><H3>Protected Fields</H3><DD><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>unsigned int </TD><TD><B>p_num_rows</B> <BR>
<I>Visible shape</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>unsigned int </TD><TD><B>p_row_step</B> <BR>
<I>How to access the memory</I>
</TD></TR></TABLE></P>

<P><TABLE>
<DT><H3>Protected Methods</H3><DD><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>INLINE const T&amp; </TD><TD><B>fast_a_m</B> (int r, int c) const <BR>
<I>quick method for returning <TT>x[m][n]</TT></I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.4"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set_values</B> (const T* <!1><A HREF="XML_Parser.html#DOC.190.3.8">data</A>, int r_step, int c_step, int start_r, int num_r, int start_c, int num_c )<BR>
<I>Get and set values from array</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.5"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>copy</B> (const <!1><A HREF="EST_TMatrix.html">EST_TMatrix</A>&lt;T&gt; &amp;<!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>)<BR>
<I>private resize and copy function.</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.6"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>copy_data</B> (const <!1><A HREF="EST_TMatrix.html">EST_TMatrix</A>&lt;T&gt; &amp;<!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>)<BR>
<I>just copy data, no resizing, no size check</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.7"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>just_resize</B> (int new_rows, int new_cols, T** old_vals)<BR>
<I>resize the memory and reset the bounds, but don't set values</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.14.8"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>default_vals</B> ()<BR>
<I>sets data and length to default values (0 in both cases)</I>
</TD></TR></TABLE></P>

</DL>
<HR><H3>Inherited from <A HREF="EST_TVector.html">EST_TVector</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>T* <B>p_memory</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>unsigned int <B>p_num_columns</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>unsigned int <B>p_offset</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>static   const T* <B>def_val</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>static   T* <B>error_return</B>
</DL></P>

<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>INLINE unsigned int <B>vcell_pos</B>(unsigned int c, unsigned int cs) const 
<DT>
<IMG ALT="o" SRC=icon2.gif>INLINE const T&amp; <B>fast_a_v</B>(int c) const 
<DT>
<IMG ALT="o" SRC=icon2.gif>const T* <B>memory</B>() const 
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>empty</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="EST_write_status.html">EST_write_status</A> <B>save</B>(const <!1><A HREF="EST_String.html">EST_String</A> &amp;<!1><A HREF="EST_TokenStream.html#DOC.10.7.9">filename</A>)
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>operator == </B>(const <!1><A HREF="EST_TVector.html">EST_TVector</A> &amp;<!1><A HREF="EST_Hash_Pair.html#DOC.91.2.2">v</A>) const 
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>operator != </B>(const <!1><A HREF="EST_TVector.html">EST_TVector</A> &amp;<!1><A HREF="EST_Hash_Pair.html#DOC.91.2.2">v</A>) const 
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>copy_section</B>(T* dest, int offset=0, int num=-1) const 
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>sub_vector</B>(<!1><A HREF="EST_TVector.html">EST_TVector</A>&lt;T&gt; &amp;sv, int start_c=0, int len=-1)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>integrity</B>() const 
</DL></P>

</DL>

<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>Template Matrix class.

<P>This is an extension of the EST_TVector class to two dimensions.

<P></BLOCKQUOTE>
<DL>

<A NAME="p_num_rows"></A>
<A NAME="DOC.14.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>unsigned int p_num_rows</B></TT>
<DD>Visible shape
<DL><DT><DD></DL><P>
<A NAME="p_row_step"></A>
<A NAME="DOC.14.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>unsigned int p_row_step</B></TT>
<DD>How to access the memory
<DL><DT><DD></DL><P>
<A NAME="fast_a_m"></A>
<A NAME="DOC.14.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>INLINE const T&amp; fast_a_m(int r, int c) const </B></TT>
<DD>quick method for returning <TT>x[m][n]</TT>
<DL><DT><DD></DL><P>
<A NAME="set_values"></A>
<A NAME="DOC.14.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set_values(const T* <!1><A HREF="XML_Parser.html#DOC.190.3.8">data</A>, int r_step, int c_step, int start_r, int num_r, int start_c, int num_c )</B></TT>
<DD>Get and set values from array
<DL><DT><DD></DL><P>
<A NAME="copy"></A>
<A NAME="DOC.14.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void copy(const <!1><A HREF="EST_TMatrix.html">EST_TMatrix</A>&lt;T&gt; &amp;<!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>)</B></TT>
<DD>private resize and copy function. 
<DL><DT><DD></DL><P>
<A NAME="copy_data"></A>
<A NAME="DOC.14.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void copy_data(const <!1><A HREF="EST_TMatrix.html">EST_TMatrix</A>&lt;T&gt; &amp;<!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>)</B></TT>
<DD>just copy data, no resizing, no size check
<DL><DT><DD></DL><P>
<A NAME="just_resize"></A>
<A NAME="DOC.14.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void just_resize(int new_rows, int new_cols, T** old_vals)</B></TT>
<DD>resize the memory and reset the bounds, but don't set values
<DL><DT><DD></DL><P>
<A NAME="default_vals"></A>
<A NAME="DOC.14.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void default_vals()</B></TT>
<DD>sets data and length to default values (0 in both cases)
<DL><DT><DD></DL><P>
<A NAME="EST_TMatrix"></A>
<A NAME="DOC.14.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_TMatrix()</B></TT>
<DD>default constructor
<DL><DT><DD></DL><P>
<A NAME="EST_TMatrix"></A>
<A NAME="DOC.14.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_TMatrix(const <!1><A HREF="EST_TMatrix.html#DOC.14.10">EST_TMatrix</A>&lt;T&gt; &amp;m)</B></TT>
<DD>copy constructor
<DL><DT><DD></DL><P>
<A NAME="EST_TMatrix"></A>
<A NAME="DOC.14.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_TMatrix(int rows, int cols)</B></TT>
<DD>"size" constructor
<DL><DT><DD></DL><P>
<A NAME="EST_TMatrix"></A>
<A NAME="DOC.14.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_TMatrix(int rows, int cols, T* <!1><A HREF="EST_TVector.html#DOC.15.1.19">memory</A>, int offset=0, int free_when_destroyed=0)</B></TT>
<DD>construct from memory supplied by caller
<DL><DT><DD></DL><P>
<A NAME="~EST_TMatrix"></A>
<A NAME="DOC.14.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ~EST_TMatrix()</B></TT>
<DD>EST_TMatrix
<DL><DT><DD></DL><P>
<A NAME="access"></A>
<A NAME="DOC.14.14"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> access</B></TT>
<DD>Basic access methods for matrices.
<DL><DT><DD></DL><P><DL>

<A NAME="num_rows"></A>
<A NAME="DOC.14.14.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int num_rows() const </B></TT>
<DD>return number of rows
<DL><DT><DD></DL><P>
<A NAME="num_columns"></A>
<A NAME="DOC.14.14.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int num_columns() const </B></TT>
<DD>return number of columns
<DL><DT><DD></DL><P>
<A NAME="a_no_check"></A>
<A NAME="DOC.14.14.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>INLINE const T&amp; a_no_check(int <!1><A HREF="EST_TMatrix.html#DOC.14.19.1">row</A>, int <!1><A HREF="EST_Token.html#DOC.9.12">col</A>) const </B></TT>
<DD>const access with no bounds check, care recommend
<DL><DT><DD></DL><P>
<A NAME="a_no_check"></A>
<A NAME="DOC.14.14.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>INLINE T&amp; a_no_check(int <!1><A HREF="EST_TMatrix.html#DOC.14.19.1">row</A>, int <!1><A HREF="EST_Token.html#DOC.9.12">col</A>)</B></TT>
<DD>access with no bounds check, care recommend
<DL><DT><DD></DL><P>
<A NAME="a_check"></A>
<A NAME="DOC.14.14.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const T&amp; a_check(int <!1><A HREF="EST_TMatrix.html#DOC.14.19.1">row</A>, int <!1><A HREF="EST_Token.html#DOC.9.12">col</A>) const </B></TT>
<DD>const element access function 
<DL><DT><DD></DL><P>
<A NAME="a_check"></A>
<A NAME="DOC.14.14.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>T&amp; a_check(int <!1><A HREF="EST_TMatrix.html#DOC.14.19.1">row</A>, int <!1><A HREF="EST_Token.html#DOC.9.12">col</A>)</B></TT>
<DD>non-const element access function 
<DL><DT><DD></DL><P>
<A NAME="operator () "></A>
<A NAME="DOC.14.14.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const T&amp; operator () (int <!1><A HREF="EST_TMatrix.html#DOC.14.19.1">row</A>, int <!1><A HREF="EST_Token.html#DOC.9.12">col</A>) const </B></TT>
<DD>const element access operator
<DL><DT><DD></DL><P>
<A NAME="operator () "></A>
<A NAME="DOC.14.14.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>T&amp; operator () (int <!1><A HREF="EST_TMatrix.html#DOC.14.19.1">row</A>, int <!1><A HREF="EST_Token.html#DOC.9.12">col</A>)</B></TT>
<DD>non-const element access operator
<DL><DT><DD></DL><P></DL>

<A NAME="resize"></A>
<A NAME="DOC.14.15"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void resize(int rows, int cols, int <!1><A HREF="set.html">set</A>=1)</B></TT>
<DD>resize matrix. If <TT>set=1</TT>, then the current values in
the matirx are preserved up to the new size <TT>n</TT>. If the
new size exceeds the old size, the rest of the matrix is
filled with the <TT>def_val</TT>
<DL><DT><DD></DL><P>
<A NAME="fill"></A>
<A NAME="DOC.14.16"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void fill(const T &amp;<!1><A HREF="EST_Hash_Pair.html#DOC.91.2.2">v</A>)</B></TT>
<DD>fill matrix with value v
<DL><DT><DD></DL><P>
<A NAME="operator="></A>
<A NAME="DOC.14.17"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="EST_TMatrix.html">EST_TMatrix</A>&amp; operator=(const <!1><A HREF="EST_TMatrix.html">EST_TMatrix</A> &amp;s)</B></TT>
<DD>assignment operator
<DL><DT><DD></DL><P>
<A NAME="add_rows"></A>
<A NAME="DOC.14.18"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="EST_TMatrix.html">EST_TMatrix</A>&amp; add_rows(const <!1><A HREF="EST_TMatrix.html">EST_TMatrix</A> &amp;s)</B></TT>
<DD>The two versions of what might have been operator +=
<DL><DT><DD></DL><P>
<A NAME="Sub-Matrix/Vector Extraction"></A>
<A NAME="DOC.14.19"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Sub-Matrix/Vector Extraction</B></TT>
<DD>
All of these return matrecies and vectors which share
memory with the original, so altering values them alters
the original. 
<DL><DT><DD></DL><P><DL>

<A NAME="row"></A>
<A NAME="DOC.14.19.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void row(<!1><A HREF="EST_TVector.html">EST_TVector</A>&lt;T&gt; &amp;rv, int r, int start_c=0, int len=-1)</B></TT>
<DD>Make the vector <TT>rv</TT> a window onto row <TT>r</TT>
<DL><DT><DD></DL><P>
<A NAME="column"></A>
<A NAME="DOC.14.19.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void column(<!1><A HREF="EST_TVector.html">EST_TVector</A>&lt;T&gt; &amp;cv, int c, int start_r=0, int len=-1)</B></TT>
<DD>Make the vector <TT>cv</TT> a window onto column <TT>c</TT>
<DL><DT><DD></DL><P>
<A NAME="sub_matrix"></A>
<A NAME="DOC.14.19.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void sub_matrix(<!1><A HREF="EST_TMatrix.html">EST_TMatrix</A>&lt;T&gt; &amp;sm, int r=0, int numr=EST_ALL, int c=0, int numc=EST_ALL)</B></TT>
<DD>Make the matrix <TT>sm</TT> a window into this matrix
<DL><DT><DD></DL><P></DL>

<A NAME="Copy in and out"></A>
<A NAME="DOC.14.20"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Copy in and out</B></TT>
<DD>Copy data between buffers and the matrix.
<DL><DT><DD></DL><P><DL>

<A NAME="copy_row"></A>
<A NAME="DOC.14.20.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void copy_row(int r, T* buf, int offset=0, int num=-1) const </B></TT>
<DD>Copy row <TT>r</TT> of matrix to <TT>buf</TT>. <TT>buf</TT>
should be pre-malloced to the correct size.
<DL><DT><DD></DL><P>
<A NAME="copy_row"></A>
<A NAME="DOC.14.20.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void copy_row(int r, <!1><A HREF="EST_TVector.html">EST_TVector</A>&lt;T&gt; &amp;<!1><A HREF="EST_Wave.html#DOC.81.4.5">t</A>, int offset=0, int num=-1) const </B></TT>
<DD>Copy row &lt;parameter&gt;r&lt;/parameter&gt; of matrix to
&lt;parameter&gt;buf&lt;/parameter&gt;. &lt;parameter&gt;buf&lt;/parameter&gt; should be
pre-malloced to the correct size.  
<DL><DT><DD></DL><P>
<A NAME="copy_column"></A>
<A NAME="DOC.14.20.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void copy_column(int c, T* buf, int offset=0, int num=-1) const </B></TT>
<DD>Copy column <TT>c</TT> of matrix to <TT>buf</TT>. <TT>buf</TT>
should be pre-malloced to the correct size.
<DL><DT><DD></DL><P>
<A NAME="copy_column"></A>
<A NAME="DOC.14.20.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void copy_column(int c, <!1><A HREF="EST_TVector.html">EST_TVector</A>&lt;T&gt; &amp;<!1><A HREF="EST_Wave.html#DOC.81.4.5">t</A>, int offset=0, int num=-1) const </B></TT>
<DD>Copy column &lt;parameter&gt;c&lt;/parameter&gt; of matrix to
&lt;parameter&gt;buf&lt;/parameter&gt;. &lt;parameter&gt;buf&lt;/parameter&gt; should
be pre-malloced to the correct size.  
<DL><DT><DD></DL><P>
<A NAME="set_row"></A>
<A NAME="DOC.14.20.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set_row(int <!1><A HREF="EST_TVector.html#DOC.15.1.20.3">n</A>, const T* buf, int offset=0, int num=-1)</B></TT>
<DD>Copy buf into row <TT>n</TT> of matrix. 
<DL><DT><DD></DL><P>
<A NAME="set_column"></A>
<A NAME="DOC.14.20.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set_column(int <!1><A HREF="EST_TVector.html#DOC.15.1.20.3">n</A>, const T* buf, int offset=0, int num=-1)</B></TT>
<DD>Copy buf into column <TT>n</TT> of matrix.         
<DL><DT><DD></DL><P>
<A NAME="set_memory"></A>
<A NAME="DOC.14.20.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set_memory(T* buffer, int offset, int rows, int columns, int free_when_destroyed=0)</B></TT>
<DD>For when you absolutely have to have access to the memory
<DL><DT><DD></DL><P></DL>

<A NAME="io"></A>
<A NAME="DOC.14.21"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> io</B></TT>
<DD>Matrix file io.
<DL><DT><DT><B>Friends:</B><DD>  ostream&amp; operator &lt;&lt; (ostream &amp;st,const <!1><A HREF="EST_TMatrix.html">EST_TMatrix</A>&lt;T&gt; &amp;<!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>)<BR><DD></DL><P><DL>

<A NAME="load"></A>
<A NAME="DOC.14.21.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="EST_read_status.html">EST_read_status</A> load(const class <!1><A HREF="EST_String.html">EST_String</A> &amp;<!1><A HREF="EST_TokenStream.html#DOC.10.7.9">filename</A>)</B></TT>
<DD>load Matrix from file - Not currently implemented
<DL><DT><DD></DL><P>
<A NAME="save"></A>
<A NAME="DOC.14.21.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="EST_write_status.html">EST_write_status</A> save(const class <!1><A HREF="EST_String.html">EST_String</A> &amp;<!1><A HREF="EST_TokenStream.html#DOC.10.7.9">filename</A>) const </B></TT>
<DD>save Matrix to file <TT>filename</TT>
<DL><DT><DD></DL><P></DL>
</DL>

<HR><DL><DT><B>This class has no child classes.</B></DL>

<DL><DT><DT><B>See Also:</B><DD>matrix_example
<BR><!1><A HREF="EST_TVector.html">EST_TVector</A><BR><DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<A HREF = "http://www.ed.ac.uk/">
   <IMG align=right BORDER=0 SRC = "edcrest.gif"></A>

<P Align=left><I>This page is part of the 
<A HREF="http://www.cstr.ed.ac.uk/projects/speech_tools.html">
Edinburgh Speech Tools Library</A> documentation
<br>
Copyright <A HREF="http://www.ed.ac.uk"> University of Edinburgh</A> 1997
<br>
Contact: <A HREF="mailto:speech_toolss@cstr.ed.ac.uk"> 
         speech_tools@cstr.ed.ac.uk </a>
</P>
<br clear=right>