#ifndef VECTOR_H #define VECTOR_H #include struct Vector { double * const data; const size_t dim; }; // Constructor struct Vector VectorConstruct(size_t dim); // Destructor void VectorDestruct(struct Vector *vec); // Pointer to element (with bounds check) double *VectorElementPtr(struct Vector *vec, size_t index); // Value of element (with bounds check) double VectorElement(const struct Vector *vec, size_t index); #endif // VECTOR_H