FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
array-python-cpp/Rectangle.h at master · benjaminirving/array-python-cpp · GitHub
benjaminirving
/
array-python-cpp
Public
Notifications
You must be signed in to change notification settings
Fork
7
Star
18
Code
Issues
0
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
array-python-cpp
/
Rectangle.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (24 loc) · 774 Bytes
Breadcrumbs
array-python-cpp
/
Rectangle.h
Copy path
File metadata and controls
28 lines (24 loc) · 774 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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);
};
}
Back
|
FazBrowse Home
|
New Git URL