[jira] [Created] (SANDBOX-404) merge Zero and Semigroup in the Monoid

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (SANDBOX-404) merge Zero and Semigroup in the Monoid

ASF GitHub Bot (Jira)
merge Zero and Semigroup in the Monoid
--------------------------------------

                 Key: SANDBOX-404
                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
             Project: Commons Sandbox
          Issue Type: Improvement
          Components: Graph
            Reporter: Simone Tripodi


As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (SANDBOX-404) merge Zero and Semigroup in the Monoid

ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simone Tripodi updated SANDBOX-404:
-----------------------------------

    Attachment: SANDBOX-404.patch

attached solution, just need a review before committing it
               

> merge Zero and Semigroup in the Monoid
> --------------------------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SANDBOX-404) merge Zero and Semigroup in the Monoid

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221631#comment-13221631 ]

Claudio Squarcella commented on SANDBOX-404:
--------------------------------------------

Hi Simone,

I applied the patch and it looks good to me, please go ahead :)

I would suggest to keep this issue open for further changes to weight operations that were proposed in ML -- maybe renaming it to "simplify weight model"?

Ciao
Claudio
               

> merge Zero and Semigroup in the Monoid
> --------------------------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SANDBOX-404) merge Zero and Semigroup in the Monoid

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221636#comment-13221636 ]

Simone Tripodi commented on SANDBOX-404:
----------------------------------------

Ciao Claudio,

Thanks for the feedbacks, anyway I think it worths analyzing more deeply how to disambiguate cases in wich our concrete implementations have the need to implement more than Monoid at the same time, before applying the patch.
I hijacked specific discussion here because in the ML we were speaking about 2 different topics, having a spike to speak about should drive us in the right direction.

going offline in a while until tonight, best and have a nice WE,
-Simo
               

> merge Zero and Semigroup in the Monoid
> --------------------------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simone Tripodi updated SANDBOX-404:
-----------------------------------

    Summary: Simplify weight model  (was: merge Zero and Semigroup in the Monoid)
   

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221645#comment-13221645 ]

Claudio Squarcella commented on SANDBOX-404:
--------------------------------------------

Hi Simo,

good that you moved discussion here so we can focus.

I don't know if I got your question correctly, but I have answers for both interpretations :)
* _what if our class has to implement two different kinds of Monoid (e.g. Addition and Multiplication)?_ I propose to convert our current {{Monoid}} to {{Addition}} to represent the sum operation (which indeed is how we use it right know). Then we can add {{Multiplication}} as a completely separate interface, without the need to be backed by the same "abstract monoid" (although, of course, theory tells us that they are both monoids):

* _what if our class has to be not just a Monoid, but also something else?_ Then we simply add a new interface. I am already thinking of clearly separating {{Monoid}}/{{Addition}} from {{Comparator}}
               

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Issue Comment Edited] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221645#comment-13221645 ]

Claudio Squarcella edited comment on SANDBOX-404 at 3/3/12 5:13 PM:
--------------------------------------------------------------------

Hi Simo,

good that you moved discussion here so that we can focus.

I don't know if I got your question correctly, but I have answers for both interpretations :)
* _what if our class has to implement two different kinds of Monoid (e.g. Addition and Multiplication)?_ I propose to convert our current {{Monoid}} to {{Addition}} to represent the sum operation (which indeed is how we use it right know). Then we can add {{Multiplication}} as a completely separate interface, without the need to be backed by the same "abstract monoid" (although, of course, theory tells us that they are both monoids):
{code}
public class DoubleOperations
    implements Addition, Comparator, Multiplication
{
    ...
}
{code}
* _what if our class has to be not just a Monoid, but also something else?_ Then we simply add a new interface. I am already thinking of clearly separating {{Monoid}}/{{Addition}} from {{Comparator}} (see code snippet above). Algorithms can still enumerate all properties/operations they need, for example:
{code}
public <WO extends Addition<W> & Comparator<W>> HeuristicBuilder<V, WE, W, G, WO> applyingAStar( WO weightOperations )
{
    ...
}
{code}

Ciao
Claudio
               
      was (Author: claudio.squarcella):
    Hi Simo,

good that you moved discussion here so we can focus.

I don't know if I got your question correctly, but I have answers for both interpretations :)
* _what if our class has to implement two different kinds of Monoid (e.g. Addition and Multiplication)?_ I propose to convert our current {{Monoid}} to {{Addition}} to represent the sum operation (which indeed is how we use it right know). Then we can add {{Multiplication}} as a completely separate interface, without the need to be backed by the same "abstract monoid" (although, of course, theory tells us that they are both monoids):

* _what if our class has to be not just a Monoid, but also something else?_ Then we simply add a new interface. I am already thinking of clearly separating {{Monoid}}/{{Addition}} from {{Comparator}}
                 

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claudio Squarcella updated SANDBOX-404:
---------------------------------------

    Attachment: SANDBOX-404_gettingRidOfOrderedMonoid.patch

Hi Simone,

I am attaching a patch that begins with yours and goes one step further, getting rid of {{OrderedMonoid}} basically everywhere and replacing it with {{Monoid & Comparator}}. That has two reasons:
* separating main operations/properties, so that every algorithm specifies what is needed in terms of a set of interfaces;
* leading the way to the next refactoring step where {{Monoid}} is converted into {{Addition}}, in order to better represent what it actually does.

So one step is missing, i.e. renaming {{Monoid}} into {{Addition}} (and {{Monoid#append}} into {{Addition#sum}}, etc) -- but I first wanted to get some feedback on this one.

Ciao
Claudio
               

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch, SANDBOX-404_gettingRidOfOrderedMonoid.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Issue Comment Edited] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221749#comment-13221749 ]

Claudio Squarcella edited comment on SANDBOX-404 at 3/4/12 10:18 AM:
---------------------------------------------------------------------

Hi Simone,

I am attaching a patch that begins with yours and goes one step further, getting rid of {{OrderedMonoid}} basically everywhere (although I did not delete {{OrderedMonoid}} itself for now) and replacing it with {{Monoid & Comparator}}. That has two reasons:
* separating main operations/properties, so that every algorithm specifies what is needed in terms of a set of interfaces;
* leading the way to the next refactoring step where {{Monoid}} is converted into {{Addition}}, in order to better represent what it actually does.

So one step is missing, i.e. renaming {{Monoid}} to {{Addition}} (and {{Monoid#append}} to {{Addition#sum}}, etc) -- but first I want to get some feedback on this one.

Ciao
Claudio
               
      was (Author: claudio.squarcella):
    Hi Simone,

I am attaching a patch that begins with yours and goes one step further, getting rid of {{OrderedMonoid}} basically everywhere and replacing it with {{Monoid & Comparator}}. That has two reasons:
* separating main operations/properties, so that every algorithm specifies what is needed in terms of a set of interfaces;
* leading the way to the next refactoring step where {{Monoid}} is converted into {{Addition}}, in order to better represent what it actually does.

So one step is missing, i.e. renaming {{Monoid}} into {{Addition}} (and {{Monoid#append}} into {{Addition#sum}}, etc) -- but I first wanted to get some feedback on this one.

Ciao
Claudio
                 

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch, SANDBOX-404_gettingRidOfOrderedMonoid.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221877#comment-13221877 ]

Simone Tripodi commented on SANDBOX-404:
----------------------------------------

hola,

having a look at the patch I am not really happy on how signatures heavily changed, once dropped the {{OrderedMonoid}}, but I can safety live with it.

The rename instead doesn't convince me at all: {{Monoid}} perfectly reflects the monoid definition - it is an interface indeed - {{Addition}} is one monoid *instance*. What is we have to add more Monoid operations? Do you intend to create new monoid for each operation?
               

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch, SANDBOX-404_gettingRidOfOrderedMonoid.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221901#comment-13221901 ]

Claudio Squarcella commented on SANDBOX-404:
--------------------------------------------

Hi!

First things first:
My idea is to completely get rid of {{Monoid}}, in favor of a group of interfaces directly representing operations. In the specific case, {{Addition}} would immediately "take its place" not semantically but *functionally*, to cover algorithm needs -- they indeed need to apply "addition" and not a generic "monoid", so that would also increase consistency. It would look more or less like this:
{code}
public interface Addition<E>
{
    E sum(E e1, E e2);
    E zero();
    E negate(E e);
}
{code}
In case later we want to add {{Multiplication}} it will be totally independent, as explained in my first comment above. Something like:
{code}
public interface Multiplication<E>
{
    E multiply(E e1, E e2);
    E one(); // or "identity()", we'll see
    E reciprocal(E e);
}
{code}

As for the signature change, I did it because I would prefer not to stack interfaces on top of each other like we did with {{Zero}}, {{Semigroup}}, {{Monoid}} and {{OrderedMonoid}}. As long as we can easily write in the signatures all the individual properties we need (in the example {{Addition}} and {{Comparator}}) we can avoid to add interfaces like {{ComparableAddition}}, {{ComparableMultiplication}}, {{ComparableAdditionMultiplication}}... see my point?

Concluding: I can work on {{Addition}} if, and as soon as, we agree.

Ciao,
Claudio
               

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch, SANDBOX-404_gettingRidOfOrderedMonoid.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Issue Comment Edited] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221901#comment-13221901 ]

Claudio Squarcella edited comment on SANDBOX-404 at 3/4/12 2:33 PM:
--------------------------------------------------------------------

Hi!

First things first:
My idea is to completely get rid of {{Monoid}}, in favor of a group of interfaces directly representing operations. In the specific case, {{Addition}} would immediately "take its place" not semantically but *functionally*, to cover algorithm needs -- indeed so far we compute "additions" and not generic "monoid operations", so that would also increase consistency and readability. It would look more or less like this:
{code}
public interface Addition<E>
{
    E sum(E e1, E e2);
    E zero();
    E negate(E e);
}
{code}
In case later we want to add {{Multiplication}} it will be totally independent, as explained in my first comment above. Something like:
{code}
public interface Multiplication<E>
{
    E multiply(E e1, E e2);
    E one(); // or "identity()", we'll see
    E reciprocal(E e);
}
{code}

As for the signature change, I did it because I would prefer not to stack interfaces on top of each other like we did with {{Zero}}, {{Semigroup}}, {{Monoid}} and {{OrderedMonoid}}. As long as we can easily write in the signatures all the individual properties we need (in the example {{Addition}} and {{Comparator}}) we can avoid to add interfaces like {{ComparableAddition}}, {{ComparableMultiplication}}, {{ComparableAdditionMultiplication}}... see my point?

Concluding: I can work on {{Addition}} if, and as soon as, we agree.

Ciao,
Claudio
               
      was (Author: claudio.squarcella):
    Hi!

First things first:
My idea is to completely get rid of {{Monoid}}, in favor of a group of interfaces directly representing operations. In the specific case, {{Addition}} would immediately "take its place" not semantically but *functionally*, to cover algorithm needs -- they indeed need to apply "addition" and not a generic "monoid", so that would also increase consistency. It would look more or less like this:
{code}
public interface Addition<E>
{
    E sum(E e1, E e2);
    E zero();
    E negate(E e);
}
{code}
In case later we want to add {{Multiplication}} it will be totally independent, as explained in my first comment above. Something like:
{code}
public interface Multiplication<E>
{
    E multiply(E e1, E e2);
    E one(); // or "identity()", we'll see
    E reciprocal(E e);
}
{code}

As for the signature change, I did it because I would prefer not to stack interfaces on top of each other like we did with {{Zero}}, {{Semigroup}}, {{Monoid}} and {{OrderedMonoid}}. As long as we can easily write in the signatures all the individual properties we need (in the example {{Addition}} and {{Comparator}}) we can avoid to add interfaces like {{ComparableAddition}}, {{ComparableMultiplication}}, {{ComparableAdditionMultiplication}}... see my point?

Concluding: I can work on {{Addition}} if, and as soon as, we agree.

Ciao,
Claudio
                 

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch, SANDBOX-404_gettingRidOfOrderedMonoid.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221906#comment-13221906 ]

Simone Tripodi commented on SANDBOX-404:
----------------------------------------

Until there will be _real_ need of adding new Monoid implementations, I would suggest to postpone the problem and keep *your* version of the patch.
Let's fight with the right weapons when we need, I wouldn't use a katana to kill a fly (unless I am Bruce Willis and I'm in Pulp Fiction :P)

best and thanks!
-Simo
               

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch, SANDBOX-404_gettingRidOfOrderedMonoid.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claudio Squarcella updated SANDBOX-404:
---------------------------------------

    Attachment: SANDBOX-404_FromMonoidToAddition.patch

Hi Simone!

I completely agree with your last sentence, and that is one of the reasons why I am providing this extended patch where there is no {{Monoid}} anymore, only {{Addition}} -- simplification of the weight operations model!

No use for theoretical algebra in the code: only clear, unambiguous names ({{sum}}, {{negate}}, {{zero}}). I think that is a primary concern as long as we have the power to improve semantics before things go "live" (releases, people using the library consistently and getting used to class names, etc). Also, no risk to extend {{Monoid}} twice *if and when* we add {{Multiplication}} or whatsoever, because it will be totally independent.

Hoping to meet your agreement and the one of others working on our beloved [graph] ;)
Claudio
               

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch, SANDBOX-404_FromMonoidToAddition.patch, SANDBOX-404_gettingRidOfOrderedMonoid.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223081#comment-13223081 ]

Simone Tripodi commented on SANDBOX-404:
----------------------------------------

Hi Claudio!

I still don't understand how the rename simplifies the actual scenario design: I suppose that users with the need to calculate a _Strongly Connected Component_ on their graph data are enough educated that should understand basic Algebra, if even a B.Sc. like me does I suppose everybody does :P

The only way to evaluate the _if and when_ condition is IMHO listing at least one graph algorithm that requires a different Monoid to perform its execution, otherwise no needs to model something unused.
               

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch, SANDBOX-404_FromMonoidToAddition.patch, SANDBOX-404_gettingRidOfOrderedMonoid.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223150#comment-13223150 ]

Claudio Squarcella commented on SANDBOX-404:
--------------------------------------------

Hi,

one question left from my side and then I shutdown ( :) ): why would you still call {{Monoid}} something which in all the algorithms is actually used and seen as an {{Addition}}?
               

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch, SANDBOX-404_FromMonoidToAddition.patch, SANDBOX-404_gettingRidOfOrderedMonoid.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223155#comment-13223155 ]

Simone Tripodi commented on SANDBOX-404:
----------------------------------------

please don't shutdown because this is a matter of making the component good software, not just writing code!

So I deduce that having an interface to define the behavior is not enough, users are still able to create an {{Addition}} instance and implement the multiplication operator inside - it doesn't matter how we call it... uhmmmm...
               

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch, SANDBOX-404_FromMonoidToAddition.patch, SANDBOX-404_gettingRidOfOrderedMonoid.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224737#comment-13224737 ]

Claudio Squarcella commented on SANDBOX-404:
--------------------------------------------

Hi,

just a quick notice to confirm that I just committed the modifications contained in [the second patch posted above|https://issues.apache.org/jira/secure/attachment/12516966/SANDBOX-404_gettingRidOfOrderedMonoid.patch] (see [r1298136|http://svn.apache.org/viewvc?view=revision&revision=1298136]) :)

Claudio
               

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch, SANDBOX-404_FromMonoidToAddition.patch, SANDBOX-404_gettingRidOfOrderedMonoid.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Issue Comment Edited] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226589#comment-13226589 ]

Simone Tripodi edited comment on SANDBOX-404 at 3/9/12 11:29 PM:
-----------------------------------------------------------------

Hi Claudio,
unfortunately the patch you committed doesn't work when launching tests from CLI (OTOH works well inside eclipse), follows below the errors I got:

{code}
$ svn info
Path: .
URL: https://svn.apache.org/repos/asf/commons/sandbox/graph/trunk
Repository Root: https://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 1299097
Node Kind: directory
Schedule: normal
Last Changed Author: cs
Last Changed Rev: 1298136
Last Changed Date: 2012-03-07 22:34:21 +0100 (Wed, 07 Mar 2012)

...

mvn clean test

...

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/shortestpath/BellmannFordTestCase.java:[77,63] type parameters of <WO>org.apache.commons.graph.shortestpath.AllVertexPairsShortestPath<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double,WO> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/spanning/KruskalTestCase.java:[71,77] type parameters of <WO>org.apache.commons.graph.SpanningTree<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/shortestpath/AStarTestCase.java:[98,65] type parameters of <WO>org.apache.commons.graph.shortestpath.HeuristicBuilder<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double,org.apache.commons.graph.model.UndirectedMutableWeightedGraph<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double>,WO> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/spanning/ReverseDeleteTestCase.java:[53,67] type parameters of <WO>org.apache.commons.graph.SpanningTree<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/spanning/PrimTestCase.java:[71,77] type parameters of <WO>org.apache.commons.graph.SpanningTree<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/shortestpath/DijkstraTestCase.java:[69,68] type parameters of <WO>org.apache.commons.graph.WeightedPath<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/spanning/BoruvkaTestCase.java:[71,77] type parameters of <WO>org.apache.commons.graph.SpanningTree<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[INFO] 7 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47.856s
[INFO] Finished at: Sat Mar 10 00:23:30 CET 2012
[INFO] Final Memory: 16M/2039M
[INFO] ------------------------------------------------------------------------
{code}

I am going to partially merge it on my experimental branch
               
      was (Author: simone.tripodi):
    Hi Claudio,
unfortunately the patch you committed doesn't work when launching tests from CLI (OTOH works well inside eclipse), follows below the errors I got:

{code}
$ svn info
Path: .
URL: https://svn.apache.org/repos/asf/commons/sandbox/graph/trunk
Repository Root: https://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 1299097
Node Kind: directory
Schedule: normal
Last Changed Author: cs
Last Changed Rev: 1298136
Last Changed Date: 2012-03-07 22:34:21 +0100 (Wed, 07 Mar 2012)

...

mvn clean test

...

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/shortestpath/BellmannFordTestCase.java:[77,63] type parameters of <WO>org.apache.commons.graph.shortestpath.AllVertexPairsShortestPath<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double,WO> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/spanning/KruskalTestCase.java:[71,77] type parameters of <WO>org.apache.commons.graph.SpanningTree<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/shortestpath/AStarTestCase.java:[98,65] type parameters of <WO>org.apache.commons.graph.shortestpath.HeuristicBuilder<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double,org.apache.commons.graph.model.UndirectedMutableWeightedGraph<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double>,WO> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/spanning/ReverseDeleteTestCase.java:[53,67] type parameters of <WO>org.apache.commons.graph.SpanningTree<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/spanning/PrimTestCase.java:[71,77] type parameters of <WO>org.apache.commons.graph.SpanningTree<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/shortestpath/DijkstraTestCase.java:[69,68] type parameters of <WO>org.apache.commons.graph.WeightedPath<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/spanning/BoruvkaTestCase.java:[71,77] type parameters of <WO>org.apache.commons.graph.SpanningTree<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[INFO] 7 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47.856s
[INFO] Finished at: Sat Mar 10 00:23:30 CET 2012
[INFO] Final Memory: 16M/2039M
[INFO] ------------------------------------------------------------------------
{code}
                 

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch, SANDBOX-404_FromMonoidToAddition.patch, SANDBOX-404_gettingRidOfOrderedMonoid.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SANDBOX-404) Simplify weight model

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226589#comment-13226589 ]

Simone Tripodi commented on SANDBOX-404:
----------------------------------------

Hi Claudio,
unfortunately the patch you committed doesn't work when launching tests from CLI (OTOH works well inside eclipse), follows below the errors I got:

{code}
$ svn info
Path: .
URL: https://svn.apache.org/repos/asf/commons/sandbox/graph/trunk
Repository Root: https://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 1299097
Node Kind: directory
Schedule: normal
Last Changed Author: cs
Last Changed Rev: 1298136
Last Changed Date: 2012-03-07 22:34:21 +0100 (Wed, 07 Mar 2012)

...

mvn clean test

...

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/shortestpath/BellmannFordTestCase.java:[77,63] type parameters of <WO>org.apache.commons.graph.shortestpath.AllVertexPairsShortestPath<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double,WO> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/spanning/KruskalTestCase.java:[71,77] type parameters of <WO>org.apache.commons.graph.SpanningTree<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/shortestpath/AStarTestCase.java:[98,65] type parameters of <WO>org.apache.commons.graph.shortestpath.HeuristicBuilder<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double,org.apache.commons.graph.model.UndirectedMutableWeightedGraph<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double>,WO> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/spanning/ReverseDeleteTestCase.java:[53,67] type parameters of <WO>org.apache.commons.graph.SpanningTree<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/spanning/PrimTestCase.java:[71,77] type parameters of <WO>org.apache.commons.graph.SpanningTree<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/shortestpath/DijkstraTestCase.java:[69,68] type parameters of <WO>org.apache.commons.graph.WeightedPath<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[ERROR] /private/tmp/graph/src/test/java/org/apache/commons/graph/spanning/BoruvkaTestCase.java:[71,77] type parameters of <WO>org.apache.commons.graph.SpanningTree<org.apache.commons.graph.model.BaseLabeledVertex,org.apache.commons.graph.model.BaseLabeledWeightedEdge<java.lang.Double>,java.lang.Double> cannot be determined; no unique maximal instance exists for type variable WO with upper bounds java.lang.Object,org.apache.commons.graph.weight.Monoid<java.lang.Double>,java.util.Comparator<java.lang.Double>
[INFO] 7 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47.856s
[INFO] Finished at: Sat Mar 10 00:23:30 CET 2012
[INFO] Final Memory: 16M/2039M
[INFO] ------------------------------------------------------------------------
{code}
               

> Simplify weight model
> ---------------------
>
>                 Key: SANDBOX-404
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-404
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Simone Tripodi
>         Attachments: SANDBOX-404.patch, SANDBOX-404_FromMonoidToAddition.patch, SANDBOX-404_gettingRidOfOrderedMonoid.patch
>
>
> As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be merged directly in one single interface

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
12