BJvector.hGo to the documentation of this file.00001 00002 // $Revision: 1.1 $ 00003 // $Date: 2001/08/23 16:45:51 $ 00004 // $Source: /usr/local/cvs/OpenSees/SRC/nDarray/BJvector.h,v $ 00005 00006 //############################################################################# 00007 // # 00008 // # 00009 // /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/~~\ # 00010 // | |____| # 00011 // | | # 00012 // | | # 00013 // | | # 00014 // | | # 00015 // | B A S E C L A S S E S | # 00016 // | | # 00017 // | | # 00018 // | | # 00019 // | | # 00020 // | C + + H E A D E R | # 00021 // | | # 00022 // | | # 00023 // | | # 00024 // | | # 00025 // /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/ | # 00026 // \_________________________________________\__/ # 00027 // # 00028 // # 00029 //############################################################################# 00030 //############################################################################# 00032 //################################################################################ 00033 //# COPYRIGHT (C): :-)) # 00034 //# PROJECT: Object Oriented Finite Element Program # 00035 //# PURPOSE: # 00036 //# CLASS: BJvector # 00037 //# # 00038 //# VERSION: # 00039 //# LANGUAGE: C++.ver >= 2.0 ( Borland C++ ver=3.10, SUN C++ ver=2.1 ) # 00040 //# TARGET OS: DOS || UNIX || . . . # 00041 //# DESIGNER(S): Boris Jeremic # 00042 //# PROGRAMMER(S): Boris Jeremic # 00043 //# # 00044 //# # 00045 //# DATE: November '92 # 00046 //# UPDATE HISTORY: 05 - __ avgust '93. redefined as derived class from # 00047 //# nDarray class # 00048 //# August 22-29 '94 choped to separate files and worked on # 00049 //# const and & issues # 00050 //# August 30-31 '94 added use_def_dim to full the CC # 00051 //# resolved problem with temoraries for # 00052 //# operators + and - ( +=, -= ) # 00053 //# # 00054 //# # 00055 //# # 00056 //# # 00057 //# # 00058 //################################################################################ 00059 //*/ 00060 00061 00062 #ifndef VECTOR_HH 00063 #define VECTOR_HH 00064 00065 #include "BJmatrix.h" 00066 00067 // All of this inheritance idioms are after 00068 // Jim Coplien : "Advanced C++ programing styles and idioms". 00069 // I tried to understand idioms and I think I succeded. 00070 00071 class BJvector : virtual public BJmatrix 00072 { 00073 public: 00074 BJvector(int order_n = 1, double initvalue = 0.0); // default constructor 00075 00076 BJvector(int order_n, double *initval); 00077 00078 BJvector(const nDarray & x); // copy-initializer 00079 00080 //.... ~BJvector( ); 00081 00082 BJvector& operator=( const BJvector & x ); // BJvector assignment 00083 //.. BJvector& operator=( const BJmatrix & x ); // BJvector assignment 00084 //.. BJvector& operator=( const nDarray & x ); // BJvector assignment 00085 00086 //####### BJmatrix operator*( BJvector &); // BJvector multiplication 00087 00088 //.... BJvector operator*( double arg); // scalar multiplication 00089 // this ellipsis at the end are just to prevent the compiler 00090 // from issuing a warning on hiding function from base class nDarray . . . 00091 double & val(int subscript, ... ); 00092 double cval(int subscript, ... ) const; // const 00093 // THE ROW COUNTER STARTS FROM 1 ( NOT FROM 0 ) 00094 00095 }; 00096 #endif |