Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "ArrayDb.h"
- class LimitArr :
- public ArrayDb
- {
- protected:
- int low_bnd;
- public:
- LimitArr();
- virtual ~LimitArr();
- LimitArr(int n, double val = 0.0);
- LimitArr(int n, int lb, double val = 0.0);
- //where lb is lower bond of array
- LimitArr(const double * pn, int n, int lb = 0);
- LimitArr(const LimitArr & a);
- LimitArr(const ArrayDb & a);
- void new_lb(int lb) { low_bnd = lb; }
- // reset lower bound
- int lbound() {
- return low_bnd;
- } // return lower bound
- int ubound() {
- return low_bnd + arsize() - 1;
- } // return upper bound
- virtual double & operator[](int i); // array indexing
- virtual const double & operator[](int i) const; // array indexing (no =)
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement