SourcePro® API Reference Guide

Product Documentation:
   SourcePro
Documentation Home
List of all members | Public Member Functions
RWNGRef< TypeT > Class Template Reference

Handles the case of a reference to an element that may have to be negated. More...

#include <rw/lapack/mat.h>

Public Member Functions

 RWNGRef (TypeT &x, bool ng=false)
 
 operator TypeT ()
 
RWNGRef< TypeT > & operator= (TypeT x)
 

Detailed Description

template<class TypeT>
class RWNGRef< TypeT >

RWNGRef handles the case of a reference to an element that may have to be negated. It is used by the RWSkewMat matrix class.

Constructor & Destructor Documentation

template<class TypeT >
RWNGRef< TypeT >::RWNGRef ( TypeT &  x,
bool  ng = false 
)
inline

Builds a reference to x. The parameter ng indicates if the reference should be negated.

Member Function Documentation

template<class TypeT >
RWNGRef< TypeT >::operator TypeT ( )
inline

This type conversion operator is invoked by the compiler as necessary to return the value referenced by the class for use as a right-side value. It may have to modify the value as necessary (for example, to take its conjugate).

template<class TypeT >
RWNGRef<TypeT>& RWNGRef< TypeT >::operator= ( TypeT  x)
inline

This function changes the value referenced by the class to the value x, after modifying x if necessary (for example, by taking its conjugate). If the reference is supposed to be read-only, a runtime error occurs.

Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.