CXXR (C++ R)
Classes | Functions
CXXR::VectorOps Namespace Reference

Services to support common operations on R vectors and arrays. More...

Classes

class  GeneralBinaryAttributeCopier
 Control attribute copying for binary functions. More...
class  BinaryNAPropagator
 Monitor function application for binary functions. More...
class  NullBinaryFunctorWrapper
 Monitor function application for binary functions. More...
class  BinaryFunction
 Class used to apply a binary function to vectors. More...
struct  CopyAllAttributes
 Control attribute copying for unary functions. More...
struct  CopyLayoutAttributes
 Control attribute copying for unary functions. More...
struct  CopyNoAttributes
 Control attribute copying for unary functions. More...
class  UnaryNAPropagator
 Monitor function application for unary functions. More...
class  NullUnaryFunctorWrapper
 Monitor function application for unary functions. More...
class  UnaryFunction
 Class used to transform a vector elementwise using unary function. More...

Functions

void checkOperandsConformable (const VectorBase *vl, const VectorBase *vr)
 Are binary operands consistent?

Detailed Description

Services to support common operations on R vectors and arrays.

This namespace encapsulates services supporting various commonly occurring operations on R vector objects, including R matrices and arrays.


Function Documentation

void CXXR::VectorOps::checkOperandsConformable ( const VectorBase vl,
const VectorBase vr 
)

Are binary operands consistent?

This function checks the operands of a binary vector function to verify that they are compatible with each other, and raises an error if not.

An error will be raised in the following circumstances:

  • Both operands are arrays, but with different dimensions.

  • Both operands are time series, but they are not conformable (i.e. they do not have the same start time, end time and frequency).

  • Just one operand is a time series, and the non-time-series operand is longer than the time-series operand.
Parameters:
vlNon-null pointer to the first operand.
vrNon-null pointer to the second operand.