Skip to content

Conversation

@magyargergo
Copy link
Contributor

Hello,

Please take a review on this commit.

Regards,
Gergo

@magyargergo magyargergo changed the title Implement the possibility of add new penalty of VertexSubtype Implementing the possibility of add new penalty of VertexSubtype Aug 27, 2018
}

public static void addPenalty(IVertexSubtype v1, IVertexSubtype v2, double value) {
penaltyMap.put(Tuple.of(v1, v2), value);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@magyargergo Javaslang HashMap is immutable by nature. This will create new instance of penaltyMap everytime addPenalty is called.
if you think this method adds value in future, consider changing penaltyMap type to java.util.HashMap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants