VecDoubleRef Class Reference

#include <vecdoubleref.h>

Inheritance diagram for VecDoubleRef:
Inheritance graph
[legend]
Collaboration diagram for VecDoubleRef:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 VecDoubleRef (double *ptr, unsigned size)
 VecDoubleRef ()
 VecDoubleRef (unsigned size)
 VecDoubleRef (Matrix &M, unsigned row)
void setRef (double *pts, unsigned size)
void setData (double *pts)

Detailed Description

This is a VecDouble that is initialized already in reference mode and trhough all its life time it never own any memory.

Definition at line 11 of file vecdoubleref.h.


Constructor & Destructor Documentation

VecDoubleRef::VecDoubleRef ( double *  ptr,
unsigned  size 
)

Definition at line 15 of file vecdoubleref.cpp.

00016 {
00017   VecDouble::setRef(ptr,size);
00018 }

VecDoubleRef::VecDoubleRef (  ) 

Definition at line 22 of file vecdoubleref.cpp.

00023 {
00024   VecDouble::setRef(NULL,0);
00025 }

VecDoubleRef::VecDoubleRef ( unsigned  size  ) 

Definition at line 29 of file vecdoubleref.cpp.

00030 {
00031   VecDouble::setRef(NULL,size);
00032 }

VecDoubleRef::VecDoubleRef ( Matrix M,
unsigned  row 
)

Initialializes a vecdouble reference pointing to a line of a matrix

Parameters:
M 
row 
Returns:

Definition at line 9 of file vecdoubleref.cpp.

00010 {
00011   assert(row < M.m());
00012   VecDouble::setRef(&M(row,0),M.n());
00013 }


Member Function Documentation

void VecDoubleRef::setData ( double *  data  ) 

Quicly makes this vector to point to another memory location

Parameters:
p 
Returns:
Pre: The vector is already pointing to someone else memory.

Definition at line 44 of file vecdoubleref.cpp.

00045 {
00046   assert(m_owner == false);
00047   val=data;
00048 }

void VecDoubleRef::setRef ( double *  p,
unsigned  size 
)

Make the vector to point to someone else memory. Once this function is called, the object is forbidden to allocate memory by its own during its hole like.

Parameters:
p 
size 
Returns:

Reimplemented from VecDouble.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Sun Apr 8 23:13:33 2012 for CO2INJECTION by  doxygen 1.6.3