Opened 16 years ago

Closed 16 years ago

#234 closed enhancement (fixed)

KernelLookup should not be inherited from DataLookup2D

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

Description (last modified by Peter)

daughter of ticket:287

needs ticket:316, ticket:315, ticket:314 and ticket:313

New description:

Two things to do. Remove inheritance and start using SmartPtr? class. In DataLookup2D we need a SmartPtr<utility::Matrix>, and in KernelLookup a SmartPtr<Kernel>. MatrixLookupWeighted will have an additional SmartPtr<utility::Matrix> for storing its weights.

Old description:

I suggest that we create a common interface class (named e.g. AbstractMatrixLookup) for MatrixLookup and MatrixLookupWeighted. AbstractMatrixLookup should in turn be inherited from DataLookup2D. This implies the three concrete classes MatrixLookup, MatrixLookupWeighted and KernelLookup are not equal sister classes, but MatrixLookup and MatrixLookupWeighted are tighter coupled together.

The reason behind this suggestion is that there are several places in which a DataLookup2D& is passed, but a KernelLookup is not expected. For example see member s of Kernel, NCC, and NBC.

Change History (4)

comment:1 Changed 16 years ago by Peter

Description: modified (diff)
Milestone: later0.4
Summary: Create common interface to MatrixLookup and MatrixLookupWeightedKernelLookup should not be inherited from DataLookup2D

comment:2 Changed 16 years ago by Peter

Status: newassigned

comment:3 Changed 16 years ago by Peter

(In [1126]) working on ticket:234

comment:4 Changed 16 years ago by Peter

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