Opened 15 years ago

Closed 15 years ago

#343 closed request (fixed)

remove DataLookup2D

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.4
Component: classifier Version: trunk
Keywords: Cc:


It is not used anywhere, so why not remove it...

Change History (5)

comment:1 Changed 15 years ago by Markus Ringnér

I am not sure I agree. There are appealing things with both choices.

I like having a base class as an interface to make sure MatrixLookup and MatrixLookupWeighted have a shared interface. We should only document to make sure !DataLookup2D is never used polymorphically since we always want two different implementations for weighted and unweighted functions anyway (we do not want to return to dynamic_casts ...). Since we never access functions from a base class pointer/reference, is there still an overhead from having virtual functions?

If we remove it how much common things would be duplicated in the two, only relatively trivial things such as columns() and rows()? Will the ref-counting be complicated?

comment:2 Changed 15 years ago by Peter

Columns and rows will be duplicated. The ref-counting is not complicated, especially not if one uses the class that encapsulates the ref-counting: SmartPtr?.

I think it is strange to have a base class to make sure they have a shared interface. What interface? If we want to be sure about something we can add tests.

comment:3 Changed 15 years ago by Markus Ringnér

OK, let us remove !DataLookup2D

comment:4 Changed 15 years ago by Peter

Owner: changed from Markus Ringnér to Peter
Status: newassigned

comment:5 Changed 15 years ago by Peter

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.