Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
8c111ee7
Commit
8c111ee7
authored
Aug 08, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved sparse vector python docs
parent
bc9bf360
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
basic.cpp
tools/python/src/basic.cpp
+15
-1
No files found.
tools/python/src/basic.cpp
View file @
8c111ee7
...
...
@@ -210,7 +210,21 @@ void bind_basic_types()
.
def
(
"__repr__"
,
pair__repr__
)
.
def_pickle
(
serialize_pickle
<
pair_type
>
());
class_
<
std
::
vector
<
pair_type
>
>
(
"sparse_vector"
,
"This object represents the mathematical idea of a column vector."
)
class_
<
std
::
vector
<
pair_type
>
>
(
"sparse_vector"
,
"This object represents the mathematical idea of a sparse column vector. It is
\n
\
simply an array of dlib.pair objects, each representing an index/value pair in
\n
\
the vector. Any elements of the vector which are missing are implicitly set to
\n
\
zero.
\n
\
\n
\
Unless otherwise noted, any routines taking a sparse_vector assume the sparse
\n
\
vector is sorted and has unique elements. That is, the index values of the
\n
\
pairs in a sparse_vector should be listed in increasing order and there should
\n
\
not be duplicates. However, some functions work with
\"
unsorted
\"
sparse
\n
\
vectors. These are dlib.sparse_vector objects that have either duplicate
\n
\
entries or non-sorted index values. Note further that you can convert an
\n
\
\"
unsorted
\"
sparse_vector into a properly sorted sparse vector by calling
\n
\
dlib.make_sparse_vector() on it. "
)
.
def
(
vector_indexing_suite
<
std
::
vector
<
pair_type
>
>
())
.
def
(
"__str__"
,
sparse_vector__str__
)
.
def
(
"__repr__"
,
sparse_vector__repr__
)
...
...
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