Changeset 1099 in Sophya for trunk/SophyaLib/TArray/tvector.cc


Ignore:
Timestamp:
Jul 26, 2000, 6:29:46 PM (25 years ago)
Author:
ansari
Message:

Protection integrite TMatrix,TVector - operateur = (BaseArray & pour TVector et operations entre matrices avec <> MemMapping (Pas termine) Reza 27/6/2000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/TArray/tvector.cc

    r976 r1099  
    1 // $Id: tvector.cc,v 1.8 2000-04-27 17:53:52 ansari Exp $
     1// $Id: tvector.cc,v 1.9 2000-07-26 16:29:46 ansari Exp $
    22//                         C.Magneville          04/99
    33#include "machdefs.h"
     
    3535  : TMatrix<T>(1,1,mm)
    3636{
     37  arrtype_ = 2;   // Type = Vector
    3738  lcv = SelectVectorType(lcv);
    3839  ReSize(n,lcv);
     
    4950  : TMatrix<T>(a)
    5051{
     52  arrtype_ = 2;   // Type = Vector
    5153}
    5254
     
    6062: TMatrix<T>(a, share)
    6163{
     64  arrtype_ = 2;   // Type = Vector
    6265}
    6366
     
    6972  if ( (size_[0] != 1) && (size_[1] != 1) )
    7073    throw SzMismatchError("TVector<T>::TVector(const TArray<T>& a) NRows()!=1 && NCols()!=1 ");
     74  arrtype_ = 2;   // Type = Vector
    7175}
    7276
     
    8690  if ( (size_[0] != 1) && (size_[1] != 1) )
    8791    throw SzMismatchError("TVector<T>::TVector(const TArray<T>& a) NRows()!=1 && NCols()!=1 ");
     92  arrtype_ = 2;   // Type = Vector
    8893  if ( (size_[0] == 1) && (size_[1] == 1) ) {
    8994    if (lcv == SameVectorType) lcv = a.GetVectorType();
     
    9196    veceli_ = (lcv ==  ColumnVector ) ?  marowi_ : macoli_;
    9297  }
     98}
     99
     100//! Constructor of a vector from a TArray \b a , with a different data type
     101template <class T>
     102TVector<T>::TVector(const BaseArray& a)
     103: TMatrix<T>()
     104{
     105  arrtype_ = 2;   // Type = Vector
     106  SetBA(a);
    93107}
    94108
Note: See TracChangeset for help on using the changeset viewer.