Epetra_IntSerialDenseVector.cpp

Go to the documentation of this file.
00001 
00002 //@HEADER
00003 // ************************************************************************
00004 // 
00005 //               Epetra: Linear Algebra Services Package 
00006 //                 Copyright (2001) Sandia Corporation
00007 // 
00008 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00009 // license for use of this work by or on behalf of the U.S. Government.
00010 // 
00011 // This library is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Lesser General Public License as
00013 // published by the Free Software Foundation; either version 2.1 of the
00014 // License, or (at your option) any later version.
00015 //  
00016 // This library is distributed in the hope that it will be useful, but
00017 // WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019 // Lesser General Public License for more details.
00020 //  
00021 // You should have received a copy of the GNU Lesser General Public
00022 // License along with this library; if not, write to the Free Software
00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00024 // USA
00025 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00026 // 
00027 // ************************************************************************
00028 //@HEADER
00029 
00030 #include "Epetra_IntSerialDenseVector.h"
00031 
00032 //=============================================================================
00033 Epetra_IntSerialDenseVector::Epetra_IntSerialDenseVector()
00034   : Epetra_IntSerialDenseMatrix()
00035 {
00036   SetLabel("Epetra::IntSerialDenseVector");
00037 }
00038 
00039 //=============================================================================
00040 Epetra_IntSerialDenseVector::Epetra_IntSerialDenseVector(int Length)
00041   : Epetra_IntSerialDenseMatrix(Length, 1)
00042 {
00043   SetLabel("Epetra::IntSerialDenseVector");
00044 }
00045 
00046 //=============================================================================
00047 Epetra_IntSerialDenseVector::Epetra_IntSerialDenseVector(Epetra_DataAccess CV_in, int* Values_in, int Length_in)
00048   : Epetra_IntSerialDenseMatrix(CV_in, Values_in, Length_in, Length_in, 1)
00049 {
00050   SetLabel("Epetra::IntSerialDenseVector");
00051 }
00052 
00053 //=============================================================================
00054 Epetra_IntSerialDenseVector::Epetra_IntSerialDenseVector(const Epetra_IntSerialDenseVector& Source)
00055   : Epetra_IntSerialDenseMatrix(Source)
00056 {}
00057 
00058 //=============================================================================
00059 Epetra_IntSerialDenseVector::~Epetra_IntSerialDenseVector()
00060 {}
00061 
00062 //=========================================================================
00063 Epetra_IntSerialDenseVector& Epetra_IntSerialDenseVector::operator = (const Epetra_IntSerialDenseVector& Source) {
00064   Epetra_IntSerialDenseMatrix::operator=(Source); // call this->Epetra_IntSerialDenseMatrix::operator =
00065   return(*this);
00066 }
00067 
00068 //=============================================================================
00069 int Epetra_IntSerialDenseVector::MakeViewOf(const Epetra_IntSerialDenseVector& Source) {
00070   int errorcode = Epetra_IntSerialDenseMatrix::MakeViewOf(Source);
00071   return(errorcode);
00072 }
00073 
00074 //=========================================================================
00075 void Epetra_IntSerialDenseVector::Print(ostream& os) const {
00076   if(CV_ == Copy)
00077     os << "Data access mode: Copy" << endl;
00078   else
00079     os << "Data access mode: View" << endl;
00080   if(A_Copied_)
00081     os << "A_Copied: yes" << endl;
00082   else
00083     os << "A_Copied: no" << endl;
00084   os << "Length(M): " << M_ << endl;
00085   if(M_ == 0)
00086     os << "(vector is empty, no values to display)";
00087   else
00088     for(int i = 0; i < M_; i++)
00089       os << (*this)(i) << " ";
00090   os << endl;
00091 }
00092 
00093 //=========================================================================
00094 int Epetra_IntSerialDenseVector::Random() {
00095   int errorcode = Epetra_IntSerialDenseMatrix::Random();
00096   return(errorcode);
00097 }

Generated on Wed May 12 21:41:05 2010 for Epetra Package Browser (Single Doxygen Collection) by  doxygen 1.4.7