Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
graph-tool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
40
Issues
40
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tiago Peixoto
graph-tool
Commits
682b4f46
Commit
682b4f46
authored
Aug 12, 2020
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
graph_draw(): handle int16_t types
parent
4523e238
Pipeline
#700
passed with stage
in 84 minutes and 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/graph_tool/draw/cairo_draw.py
src/graph_tool/draw/cairo_draw.py
+5
-4
No files found.
src/graph_tool/draw/cairo_draw.py
View file @
682b4f46
...
...
@@ -345,7 +345,8 @@ def _convert(attr, val, cmap, pmap_default=False, g=None, k=None):
if
isinstance
(
val
,
PropertyMap
):
if
val
.
value_type
()
in
[
"vector<double>"
,
"vector<long double>"
]:
return
val
if
val
.
value_type
()
in
[
"vector<int32_t>"
,
"vector<int64_t>"
,
"vector<bool>"
]:
if
val
.
value_type
()
in
[
"vector<int16_t>"
,
"vector<int32_t>"
,
"vector<int64_t>"
,
"vector<bool>"
]:
g
=
val
.
get_graph
()
new_val
=
g
.
new_vertex_property
(
"vector<double>"
)
rg
=
[
numpy
.
inf
,
-
numpy
.
inf
]
...
...
@@ -407,12 +408,12 @@ def _convert(attr, val, cmap, pmap_default=False, g=None, k=None):
elif
isinstance
(
val
,
PropertyMap
):
if
val
.
value_type
()
in
[
"vector<double>"
,
"vector<long double>"
]:
new_val
=
val
elif
val
.
value_type
()
in
[
"int32_t"
,
"int64_t"
,
"double"
,
elif
val
.
value_type
()
in
[
"int
16_t"
,
"int
32_t"
,
"int64_t"
,
"double"
,
"long double"
,
"unsigned long"
,
"unsigned int"
,
"bool"
]:
g
=
val
.
get_graph
()
if
val
.
value_type
()
in
[
"int
32_t"
,
"int64_t"
,
"unsigned long
"
,
"unsigned int"
]:
if
val
.
value_type
()
in
[
"int
16_t"
,
"int32_t"
,
"int64_t
"
,
"unsigned
long"
,
"unsigned
int"
]:
nval
=
perfect_prop_hash
([
val
])[
0
]
else
:
nval
=
val
...
...
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