MathTL
algebra/matrix_block.h
00001 // -*- c++ -*-
00002 
00003 // +--------------------------------------------------------------------+
00004 // | This file is part of MathTL - the Mathematical Template Library    |
00005 // |                                                                    |
00006 // | Copyright (c) 2002-2009                                            |
00007 // | Thorsten Raasch, Manuel Werner                                     |
00008 // +--------------------------------------------------------------------+
00009 
00010 #ifndef _MATHTL_MATRIX_BLOCK_H
00011 #define _MATHTL_MATRIX_BLOCK_H
00012 
00013 #include <iostream>
00014 
00015 namespace MathTL
00016 {
00021   template <class C>
00022   class MatrixBlock
00023   {
00024   public:
00028     typedef typename Vector<C>::size_type size_type;
00029 
00031     virtual ~MatrixBlock() = 0;
00032 
00034     virtual const size_type row_dimension() const = 0;
00035     
00037     virtual const size_type column_dimension() const = 0;
00038 
00044     virtual void apply(const Vector<C>& x, Vector<C>& Mx) const = 0;
00045     
00051     virtual void apply_transposed(const Vector<C>& x, Vector<C>& Mtx) const = 0;
00052 
00054     virtual MatrixBlock<C>* clone() const = 0;
00055 
00057     virtual MatrixBlock<C>* clone_transposed() const = 0;
00058 
00060     virtual void print(std::ostream& os,
00061                        const unsigned int tabwidth = 10,
00062                        const unsigned int precision = 3) const = 0;
00063   };
00064 }
00065 
00066 #include <algebra/matrix_block.cpp>
00067 
00068 #endif
 All Classes Functions Variables Typedefs Enumerations