Opened 13 years ago

Last modified 13 years ago

#397 new discussion

Arithmetic for DataWeight

Reported by: Peter Owned by: Jari Häkkinen
Priority: major Milestone: yat 0.x+
Component: utility Version: trunk
Keywords: Cc:

Description (last modified by Peter)

There is no arithmetic for DataWeight.

Is that a feature, we would like to have? If so, which operations and how to define those operations?

Change History (3)

comment:1 Changed 13 years ago by Peter

Description: modified (diff)

comment:2 Changed 13 years ago by Peter

If we add arithmetic operations we should also add so one can mix DataWeight? and double. For instance:

DataWeight operator+(DataWeight, double)

Obviously these must be defines so a double is equivalent with a DataWeight? for which w=1.0.

comment:3 in reply to:  2 Changed 13 years ago by Peter

Replying to peter:

Obviously these must be defines so a double is equivalent with a DataWeight? for which w=1.0.

or we could allow implicit construction of a DataWeight from a double.

Note: See TracTickets for help on using tickets.