Marker methods is what we did in Mahout. Marker interfaces is what I think we perhaps should have done.
My rationale is that you can always introduce new marker interfaces without changing the API but if you introduce a new marker method and aren't hard-core about never using interfaces where abstract classes will do, then you are in a world of API-change hurt. I don't know if there is a performance difference. Presumably the cost of even a simple matrix operation will swamp any potential difference. On Sat, Jul 2, 2011 at 9:39 AM, Luc Maisonobe <luc.maison...@free.fr> wrote: > Le 02/07/2011 18:20, Ted Dunning a écrit : > > That won't work. >> >> That only works for statically declared matrix types, not run-time matrix >> types. To be usable, the suggested mechanism must work against runtime >> data-types. >> > > I agree with this need to work with runtime data-types. > In one of your messages, you wrote about marker predicated like > isSymmetric() or the like. In another message, you wrote about using > instanceof. What would be the better approach ? >