-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1571 Add degree variance evolution operator #1584
base: develop
Are you sure you want to change the base?
#1571 Add degree variance evolution operator #1584
Conversation
…group reduce and adjust unit test
@@ -0,0 +1,19 @@ | |||
[#1559] add unit-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this file ?
* Creates an instance of this group reduce function. | ||
* | ||
*/ | ||
public GroupDegreeTreesToVariance() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed.
|
||
if (opt.isPresent()) { | ||
mean = (double) opt.get() / (double) numberOfVertices; | ||
opt2 = Optional.of(vertexDegrees.values().stream() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you are using an optional here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please work with primitive types after fetching the values from the optionals. with Optional::orElse() you can define a value in the case of no value in optional.
*/ | ||
@FunctionAnnotation.ForwardedFields("f0") | ||
public class TransformDeltaToAbsoluteDegreeTree | ||
implements MapFunction<Tuple2<GradoopId, TreeMap<Long, Integer>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong indentation.
@FunctionAnnotation.ForwardedFields("f0") | ||
public class TransformDeltaToAbsoluteDegreeTree | ||
implements MapFunction<Tuple2<GradoopId, TreeMap<Long, Integer>>, | ||
Tuple2<GradoopId, TreeMap<Long, Integer>>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong indentation.
Collection<Tuple2<GradoopId, String>> idLabelCollection = new HashSet<>(); | ||
testGraph.getVertices().map(v -> new Tuple2<>(v.getId(), v.getLabel())) | ||
.returns(new TypeHint<Tuple2<GradoopId, String>>() { | ||
}).output(new LocalCollectionOutputFormat<>(idLabelCollection)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move }) to line above.
@Before | ||
public void setUp() throws Exception { | ||
testGraph = getTestGraphWithValues(); | ||
Collection<Tuple2<GradoopId, String>> idLabelCollection = new HashSet<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need this?
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Types of Changes
Checklist: