AbstractLinAlgPack_VectorMutableSubView.hpp

Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
00005 //                  Copyright (2003) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef VECTOR_WITH_OP_MUTABLE_SUB_VIEW_H
00030 #define VECTOR_WITH_OP_MUTABLE_SUB_VIEW_H
00031 
00032 #include "AbstractLinAlgPack_VectorMutable.hpp"
00033 #include "AbstractLinAlgPack_VectorSubView.hpp"
00034 
00035 namespace AbstractLinAlgPack {
00036 
00050 class VectorMutableSubView
00051   : virtual public VectorMutable
00052   , virtual public VectorSubView
00053 {
00054 public:
00055 
00060   VectorMutableSubView();
00061 
00064   VectorMutableSubView( const vec_mut_ptr_t& full_vec, const Range1D& rng );
00065 
00074   void initialize( const vec_mut_ptr_t& vec, const Range1D& rng );
00075 
00083   void set_uninitialized();
00084 
00086   const vec_mut_ptr_t& full_vec() const;
00087 
00090 
00092   vec_ptr_t sub_view( const Range1D& rng ) const;
00093 
00095 
00098   
00100   void set_ele( index_type i, value_type val );
00102   vec_mut_ptr_t sub_view( const Range1D& rng );
00104   void get_sub_vector( const Range1D& rng, RTOpPack::MutableSubVector* sub_vec );
00106   void commit_sub_vector( RTOpPack::MutableSubVector* sub_vec );
00108   void set_sub_vector( const RTOpPack::SparseSubVector& sub_vec );
00109 
00111 
00112 private:
00113 
00114   vec_mut_ptr_t       full_vec_; // The full vector
00115 
00116   // Not defined and not to be called!
00117   VectorMutableSubView& operator=(const VectorMutableSubView&);
00118 
00119 }; // end class VectorMutableSubView
00120 
00121 // //////////////////////////////////
00122 // Inline members
00123 
00124 inline
00125 VectorMutableSubView::VectorMutableSubView()
00126 {}
00127 
00128 inline
00129 const VectorMutableSubView::vec_mut_ptr_t&
00130 VectorMutableSubView::full_vec() const
00131 {
00132   return full_vec_;
00133 }
00134 
00135 } // end namespace AbstractLinAlgPack
00136 
00137 #endif // VECTOR_WITH_OP_MUTABLE_SUB_VIEW_H

Generated on Thu Sep 18 12:35:13 2008 for MOOCHO (Single Doxygen Collection) by doxygen 1.3.9.1