// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _math_IntegerVector_HeaderFile #define _math_IntegerVector_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _math_SingleTabOfInteger_HeaderFile #include #endif #ifndef _Standard_Address_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Standard_OStream_HeaderFile #include #endif class Standard_DimensionError; class Standard_DivideByZero; class Standard_RangeError; class math_Matrix; //! This class implements the real IntegerVector abstract data type.
//! IntegerVectors can have an arbitrary range which must be define at
//! the declaration and cannot be changed after this declaration.
//! Example: math_IntegerVector V1(-3, 5); // an IntegerVector with
//! range [-3..5]
class math_IntegerVector { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } //! contructs an IntegerVector in the range [Lower..Upper]
Standard_EXPORT math_IntegerVector(const Standard_Integer First,const Standard_Integer Last); //! contructs an IntegerVector in the range [Lower..Upper]
//! with all the elements set to InitialValue.
Standard_EXPORT math_IntegerVector(const Standard_Integer First,const Standard_Integer Last,const Standard_Integer InitialValue); //! Initialize an IntegerVector with all the elements
//! set to InitialValue.
Standard_EXPORT void Init(const Standard_Integer InitialValue) ; //! constructs an IntegerVector in the range [Lower..Upper]
//! which share the "c array" Tab.
Standard_EXPORT math_IntegerVector(const Standard_Address Tab,const Standard_Integer First,const Standard_Integer Last); //! constructs a copy for initialization.
//! An exception is raised if the lengths of the IntegerVectors
//! are different.
Standard_EXPORT math_IntegerVector(const math_IntegerVector& Other); //! returns the length of an IntegerVector
Standard_Integer Length() const; //! returns the value of the Lower index of an IntegerVector.
Standard_Integer Lower() const; //! returns the value of the Upper index of an IntegerVector.
Standard_Integer Upper() const; //! returns the value of the norm of an IntegerVector.
Standard_EXPORT Standard_Real Norm() const; //! returns the value of the square of the norm of an
//! IntegerVector.
Standard_EXPORT Standard_Real Norm2() const; //! returns the value of the Index of the maximum element of
//! an IntegerVector.
Standard_EXPORT Standard_Integer Max() const; //! returns the value of the Index of the minimum element
//! of an IntegerVector.
Standard_EXPORT Standard_Integer Min() const; //! inverses an IntegerVector.
Standard_EXPORT void Invert() ; //! returns the inverse IntegerVector of an IntegerVector.
Standard_EXPORT math_IntegerVector Inverse() const; //! sets an IntegerVector from to to the
//! IntegerVector ;
//! An exception is raised if I1UpperIndex or I1>I2.
//! An exception is raised if I2-I1+1 is different from the Length of V.
Standard_EXPORT void Set(const Standard_Integer I1,const Standard_Integer I2,const math_IntegerVector& V) ; //! slices the values of the IntegerVector between and
//! :
//! Example: [2, 1, 2, 3, 4, 5] becomes [2, 4, 3, 2, 1, 5] between 2 and 5.
//! An exception is raised if I1UpperIndex.
Standard_EXPORT math_IntegerVector Slice(const Standard_Integer I1,const Standard_Integer I2) const; //! returns the product of an IntegerVector by an integer value.
Standard_EXPORT void Multiply(const Standard_Integer Right) ; void operator *=(const Standard_Integer Right) { Multiply(Right); } //! returns the product of an IntegerVector by an integer value.
Standard_EXPORT math_IntegerVector Multiplied(const Standard_Integer Right) const; math_IntegerVector operator*(const Standard_Integer Right) const { return Multiplied(Right); } //! returns the product of a vector and a real value.
Standard_EXPORT math_IntegerVector TMultiplied(const Standard_Integer Right) const; friend math_IntegerVector operator *(const Standard_Integer Left,const math_IntegerVector& Right); //! adds the IntegerVector to an IntegerVector.
//! An exception is raised if the IntegerVectors have not the same
//! length.
//! An exception is raised if the lengths are not equal.
Standard_EXPORT void Add(const math_IntegerVector& Right) ; void operator +=(const math_IntegerVector& Right) { Add(Right); } //! adds the IntegerVector to an IntegerVector.
//! An exception is raised if the IntegerVectors have not the same
//! length.
//! An exception is raised if the lengths are not equal.
Standard_EXPORT math_IntegerVector Added(const math_IntegerVector& Right) const; math_IntegerVector operator+(const math_IntegerVector& Right) const { return Added(Right); } //! sets an IntegerVector to the sum of the IntegerVector
//! and the IntegerVector .
//! An exception is raised if the lengths are different.
Standard_EXPORT void Add(const math_IntegerVector& Left,const math_IntegerVector& Right) ; //! sets an IntegerVector to the substraction of
//! from .
//! An exception is raised if the IntegerVectors have not the same
//! length.
Standard_EXPORT void Subtract(const math_IntegerVector& Left,const math_IntegerVector& Right) ; //! accesses (in read or write mode) the value of index Num of
//! an IntegerVector.
Standard_Integer& Value(const Standard_Integer Num) const; Standard_Integer& operator()(const Standard_Integer Num) const { return Value(Num); } //! Initialises an IntegerVector by copying .
//! An exception is raised if the Lengths are different.
Standard_EXPORT math_IntegerVector& Initialized(const math_IntegerVector& Other) ; math_IntegerVector& operator=(const math_IntegerVector& Other) { return Initialized(Other); } //! returns the inner product of 2 IntegerVectors.
//! An exception is raised if the lengths are not equal.
Standard_EXPORT Standard_Integer Multiplied(const math_IntegerVector& Right) const; Standard_Integer operator*(const math_IntegerVector& Right) const { return Multiplied(Right); } //! returns the opposite of an IntegerVector.
Standard_EXPORT math_IntegerVector Opposite() ; math_IntegerVector operator-() { return Opposite(); } //! returns the subtraction of from .
//! An exception is raised if the IntegerVectors have not the same length.
Standard_EXPORT void Subtract(const math_IntegerVector& Right) ; void operator-=(const math_IntegerVector& Right) { Subtract(Right); } //! returns the subtraction of from .
//! An exception is raised if the IntegerVectors have not the same length.
Standard_EXPORT math_IntegerVector Subtracted(const math_IntegerVector& Right) const; math_IntegerVector operator-(const math_IntegerVector& Right) const { return Subtracted(Right); } //! returns the multiplication of an integer by an
//! IntegerVector.
Standard_EXPORT void Multiply(const Standard_Integer Left,const math_IntegerVector& Right) ; //! Prints on the stream o information on the current state
//! of the object.
//! Is used to redefine the operator <<.
Standard_EXPORT void Dump(Standard_OStream& o) const; friend class math_Matrix; protected: //! is used internally to set the Lower value of the
//! IntegerVector.
Standard_EXPORT void SetFirst(const Standard_Integer First) ; private: Standard_Integer FirstIndex; Standard_Integer LastIndex; math_SingleTabOfInteger Array; }; #include // other Inline functions and methods (like "C++: function call" methods) #endif