Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Gvisual/src/gvisual/GraphFileParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ public static ParseResult parse(String filePath, Predicate<String> visibleFilter
continue;
}

float weight;
double weight;
try {
weight = Float.parseFloat(parts[3]);
weight = Double.parseDouble(parts[3]);
} catch (NumberFormatException e) {
LOGGER.warning("Skipping edge with invalid weight: " + line);
skipped++;
continue;
}
if (Float.isNaN(weight) || Float.isInfinite(weight)) {
if (Double.isNaN(weight) || Double.isInfinite(weight)) {
LOGGER.warning("Skipping edge with non-finite weight: " + line);
skipped++;
continue;
Expand Down
6 changes: 3 additions & 3 deletions Gvisual/src/gvisual/edge.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class edge {
private String edgeType;
private String vertex1;
private String vertex2;
private float weight;
private double weight;
private String label;
private Long timestamp; // epoch millis (null = static/untimed edge)
private Long endTimestamp; // optional: for interval-based edges
Expand Down Expand Up @@ -63,12 +63,12 @@ public edge(String edgeType,String vertex1,String vertex2)
this.vertex2 = vertex2;
}

public void setWeight(float weight)
public void setWeight(double weight)
{
this.weight = weight;
}

public float getWeight()
public double getWeight()
{
return this.weight;
}
Expand Down
Loading