Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
2ed128e2
Commit
2ed128e2
authored
May 26, 2018
by
Davis King
Browse files
Made dlib.range a little more like the python range.
parent
d2fa9e85
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
tools/python/src/basic.cpp
tools/python/src/basic.cpp
+1
-0
No files found.
tools/python/src/basic.cpp
View file @
2ed128e2
...
...
@@ -182,6 +182,7 @@ void bind_basic_types(py::module& m)
typedef
pair
<
unsigned
long
,
unsigned
long
>
range_type
;
py
::
class_
<
range_type
>
(
m
,
"range"
,
"This object is used to represent a range of elements in an array."
)
.
def
(
py
::
init
<
unsigned
long
,
unsigned
long
>
())
.
def
(
py
::
init
([](
unsigned
long
end
){
return
range_type
(
0
,
end
);
}))
.
def_readwrite
(
"begin"
,
&
range_type
::
first
,
"The index of the first element in the range. This is represented using an unsigned integer."
)
.
def_readwrite
(
"end"
,
&
range_type
::
second
,
"One past the index of the last element in the range. This is represented using an unsigned integer."
)
.
def
(
"__str__"
,
range__str__
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment