-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathRectangle.h
More file actions
28 lines (24 loc) · 774 Bytes
/
Rectangle.h
File metadata and controls
28 lines (24 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
Passing variables / arrays between cython and cpp
Example from
http://docs.cython.org/src/userguide/wrapping_CPlusPlus.html
Adapted to include passing of multidimensional arrays
*/
#include <vector>
#include <iostream>
namespace shapes {
class Rectangle {
public:
int x0, y0, x1, y1;
Rectangle(int x0, int y0, int x1, int y1);
~Rectangle();
int getLength();
int getHeight();
int getArea();
void move(int dx, int dy);
double sum_vec(std::vector<double> sv);
double sum_mat(std::vector< std::vector<double> > sv);
double sum_mat_ref(const std::vector< std::vector<double> > & sv);
std::vector< std::vector<double> > ret_mat(std::vector< std::vector<double> > sv);
};
}