Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!monet.Berkeley.EDU!molbio From: molbio@monet.Berkeley.EDU (Mr. Molbio) Newsgroups: comp.lang.c Subject: Re: Complex type / C++ Message-ID: <18829@ucbvax.BERKELEY.EDU> Date: Mon, 11-May-87 00:42:57 EDT Article-I.D.: ucbvax.18829 Posted: Mon May 11 00:42:57 1987 Date-Received: Wed, 13-May-87 00:38:17 EDT Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: thomas@xcssun.UUCP (Vincent thomas) Lines: 21 Keywords: operator overload Summary: References: Disorganization: U.C. Berkeley >data type. There is a problem, though, with trying to borrow the >real-number arithmetic operations for use with other types of >"number". For example, I am at a loss as to what U*V should mean >for U,V vectors. Is that an outer product? wedge product? inner >product? what metric? (Certainly the componentwise product of the >holors is not what is wanted.) Multiplication of fancy numbers (e.g. >matrices) tends not to be commutative. What symbol do we use for the >very important transposition operator? How about inverses (division >is often not a useful concept for fancy numbers).. Good point. It makes sense not to try and overload "*", which is always commutative in C (and may be rearranged by the compiler) with a non-commutative operator. How do languages like C++ and Ada deal with this? Do they require the definition of some minimal set of operators? Is there a K&R of C++? I would like to learn more about C++ but don't know how to go about doing this. ..!ucbvax!xcssun!thomas