// di1 - the first variable
// di2 - the second variable
// 1st way:
DynamicInteger di3 = new DynamicInteger(di1, di2.getIntervals(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY));
// endpoints are included by default, but you can use getIntervals(Interval interval),
// which lets you specify if endpoints should be included or excluded
// 2nd way:
DynamicInteger di3 = (DynamicInteger)DynamicUtilities.createDynamicObject(
AttributeType.DYNAMIC_INT,
di1,
di2.getIntervals(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY)
);
Hello @dev,
I don't find a proper method to merge two DynamicInteger objects. My use case:
I execute a dynamic statistic for a particular time window, and I get a DynamicInteger object containing my results.
Then I execute it again but on the next time window, so I get another DynamicInteger object.
I want to merge the two results in a single object. How is it possible:
- if there is no time overlap?
- if there is time overlap?
Thanks,
Seb
_______________________________________________
gephi-dev mailing list
geph...@lists.gephi.org
http://gephi.org/mailman/listinfo/gephi-dev
Hmm, it doesn't work, because createDynamicObject() clones only di1:
DynamicInteger di3 = new DynamicInteger(di1, di2.getIntervals(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY));
Fills di3 with the content of di1 restricted by the intervals of di2.
What I need is:public static DynamicType createDynamicObject(AttributeType type, DynamicType source1, DynamicType source2, Interval in, Interval out)
It is clear that the support of Dynamics in Gephi still needs strong improvements to be usable in a real-world scenario. So I'll separate now my regular work (which will be made dirty due to time constraints, so bad...) and the contributions I will have on this part of Gephi.
Cezary & Mathieu, I propose to switch to a private email thread now to discuss on how to achieve this work: I have use cases, you have the vision and know how it is implemented. Let's make pop-corn now :)
Seb2010/12/3 Sébastien Heymann <sebastie...@gephi.org>Okay, thanks!
Seb2010/12/3 Cezary Bartosiak <cezary.b...@gmail.com>
DynamicInteger di3 = new DynamicInteger(di1, di2.getIntervals(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY));
public static DynamicType createDynamicObject(AttributeType type, DynamicType source1, DynamicType source2, Interval in, Interval out)
Okay, thanks!
Seb2010/12/3 Cezary Bartosiak <cezary.b...@gmail.com>
Well, there is no any merge method now. But you can create new DynamicInteger that will contain intervals from the first variable and the second one. You can do this this way: