Re: data structure / object
- To: mathgroup at smc.vnet.net
- Subject: [mg16371] Re: [mg16293] data structure / object
- From: "Wolf, Hartmut" <hwolf at debis.com>
- Date: Thu, 11 Mar 1999 02:16:44 -0500
- Organization: debis Systemhaus
- References: <199903070605.BAA23718@smc.vnet.net.>
- Sender: owner-wri-mathgroup at wolfram.com
Hello Antoine, try: In[1]:= p=point[1,2];q=point[-1,3]; In[2]:= point/: Plus[a__point] :=Thread[Unevaluated[Plus[a]],point] In[3]:= r=p+q Out[3]= point[0,5] also: In[4]:= u= point[u1, u2, u3]; v= point[v1, v1, v3]; w= point[w1, w2, w3]; In[5]:= u+v+w Out[5]= point[u1+v1+w1,u2+v1+w2,u3+v3+w3] your's Hartmut _______________________________________________________ Hartmut Wolf, debis Systemhaus, Darmstadt, Germany
- References:
- data structure / object
- From: "schatzi" <antoine.zahnd@iprolink.ch>
- data structure / object