#include <iomanip>
#include <cassert>

////////////////////////////////////////////////////////////////////////
//// This header contains simple implementation of class vector     ////
////////////////////////////////////////////////////////////////////////
class Vector{
  int N;     // size of the vector
  double *m; // pointer to data
public:
  ///// constructors & destructor
  Vector(int N, double def_val=0); // constructor takes size as an argument
  Vector();                        // default constructor is called when no arguments are given
  Vector(const Vector& A);         // copy constructor necessary for return by value
  ~Vector();                       // desctructor necessary because we have pointers to deallocate
  ///// other class members
  double operator[](int i) const;  // array access operator for reading
  double& operator[](int i);       // array access operator for writting
  int size() const {return N;}     // returns size
  void resize(int N);              // resizes existing vector
  void random();                   // fills with random numbers
};

// Default constructor creates empty vector
Vector::Vector() : N(0), m(NULL)
{};

// Given initial size and default value, vector is initialized
Vector::Vector(int N_, double def_val) : N(0), m(NULL)
{}

// Copy constructor needed for return by value
Vector::Vector(const Vector& A) : N(0), m(NULL)
{}

// Whenever constructor allocates memory, destructor needs to deallocate the same
// chunk of memory
Vector::~Vector()
{}

// checks the bound when reading -- very usefull feature
inline double Vector::operator[](int i) const
{}

// checks the bound when writting -- even more usefull feature
inline double& Vector::operator[](int i)
{}

// resizing of vector
void Vector::resize(int N_)
{}

void Vector::random()// fills with random numbers
{}

// Printing of a vector in Python style.
// Note that it can not be member function (vector appears on the right hand side)
// Note that it needs to return stream by reference and takes stream as first argument
// and object as second argument
std::ostream& operator<<(std::ostream& stream, const Vector& m)
{}


