Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
2c35af58
Commit
2c35af58
authored
Dec 03, 2010
by
Tiago Peixoto
Browse files
Add missing type aliases
parent
5bfd6485
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc/quickstart.rst
View file @
2c35af58
...
...
@@ -201,23 +201,23 @@ type*, which must be chosen from the predefined set:
.. table::
======================= ================
======================= ================
======
Type name Alias
======================= ================
======================= ================
======
``bool`` ``uint8_t``
``int32_t`` ``int``
``int64_t`` ``long``
``int32_t`` ``int``
``int64_t`` ``long``
, ``long long``
``double`` ``float``
``long double``
``string``
``long double``
``string``
``vector<bool>`` ``vector<uint8_t>``
``vector<int32_t>`` ``vector<int>``
``vector<int64_t>`` ``vector<long>``
``vector<int64_t>`` ``vector<long>``
, ``vector<long long>``
``vector<double>`` ``vector<float>``
``vector<long double>``
``vector<string>``
``python::object`` ``object``
======================= ================
``python::object`` ``object``
======================= ================
======
New property maps can be created for a given graph by calling the
:meth:`~graph_tool.Graph.new_vertex_property`, :meth:`~graph_tool.Graph.new_edge_property`, or
...
...
src/graph_tool/core.py
View file @
2c35af58
...
...
@@ -80,9 +80,10 @@ def _type_alias(type_name):
alias
=
{
"int8_t"
:
"bool"
,
"boolean"
:
"bool"
,
"int"
:
"int32_t"
,
"long"
:
"int
32
_t"
,
"long"
:
"int
64
_t"
,
"long long"
:
"int64_t"
,
"object"
:
"python::object"
}
"object"
:
"python::object"
,
"float"
:
"double"
}
if
type_name
in
value_types
():
return
type_name
if
type_name
in
alias
:
...
...
@@ -235,23 +236,23 @@ class PropertyMap(object):
.. table::
======================= ================
======================= ================
======
Type name Alias
======================= ================
======================= ================
======
``bool`` ``uint8_t``
``int32_t`` ``int``
``int64_t`` ``long``
``int64_t`` ``long``
, ``long long``
``double`` ``float``
``long double``
``string``
``vector<bool>`` ``vector<uint8_t>``
``vector<int32_t>`` ``vector<int>``
``vector<int64_t>`` ``vector<long>``
``vector<int64_t>`` ``vector<long>``
, ``vector<long long>``
``vector<double>`` ``vector<float>``
``vector<long double>``
``vector<string>``
``python::object`` ``object``
======================= ================
======================= ================
======
"""
def
__init__
(
self
,
pmap
,
g
,
key_type
,
key_trans
=
None
):
self
.
__map
=
pmap
...
...
Write
Preview
Supports
Markdown
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