Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
YoshikoWrapper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Philipp Spohr
YoshikoWrapper
Commits
715604d0
Commit
715604d0
authored
7 years ago
by
Philipp Spohr
Browse files
Options
Downloads
Patches
Plain Diff
Fix for dumb error
parent
6b1ca84c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/hhu/ba/yoshikoWrapper/core/NetworkParser.java
+16
-11
16 additions, 11 deletions
...ain/java/de/hhu/ba/yoshikoWrapper/core/NetworkParser.java
with
16 additions
and
11 deletions
src/main/java/de/hhu/ba/yoshikoWrapper/core/NetworkParser.java
+
16
−
11
View file @
715604d0
...
@@ -32,22 +32,27 @@ public class NetworkParser {
...
@@ -32,22 +32,27 @@ public class NetworkParser {
//Fetch edges
//Fetch edges
List
<
CyEdge
>
edges
=
net
.
getEdgeList
();
List
<
CyEdge
>
edges
=
net
.
getEdgeList
();
//Find out if the weights are double or int
@SuppressWarnings
(
"unchecked"
)
Class
<?
extends
Number
>
weightType
=
(
Class
<?
extends
Number
>)
weightColumn
.
getType
();
logger
.
info
(
"Column has type: "
+
weightType
.
getName
());
//Loop over edges
//Loop over edges
for
(
CyEdge
e
:
edges
)
{
for
(
CyEdge
e
:
edges
)
{
CyRow
edgeEntry
=
net
.
getRow
(
e
);
CyRow
edgeEntry
=
net
.
getRow
(
e
);
//Set to default cost
double
weight
=
deletionCostDefault
;
double
weight
=
deletionCostDefault
;
if
(
weightColumn
!=
null
){
try
{
try
{
//Find out if the weights are double or int
@SuppressWarnings
(
"unchecked"
)
Class
<?
extends
Number
>
weightType
=
(
Class
<?
extends
Number
>)
weightColumn
.
getType
();
logger
.
info
(
"Column has type: "
+
weightType
.
getName
());
weight
=
(
double
)
edgeEntry
.
get
(
weightColumn
.
getName
(),
weightType
);
weight
=
(
double
)
edgeEntry
.
get
(
weightColumn
.
getName
(),
weightType
);
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
//Invalid entry (no entry)
//Invalid entry (no entry)
logger
.
info
(
"No valid edit costs defined for: "
+
edgeEntry
.
get
(
"name"
,
String
.
class
)+
", falling back to default value!"
);
logger
.
info
(
"No valid edit costs defined for: "
+
edgeEntry
.
get
(
"name"
,
String
.
class
)+
", falling back to default value!"
);
}
}
}
logger
.
debug
(
"Found Edge: "
+
edgeEntry
.
get
(
"name"
,
String
.
class
)+
" with weight:"
+
weight
);
logger
.
debug
(
"Found Edge: "
+
edgeEntry
.
get
(
"name"
,
String
.
class
)+
" with weight:"
+
weight
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment