Questions tagged [upvalues]
77 questions
44
votes
4 answers
Do people actually use UpValues?
I know what they are and how to define them. They have to serve some purpose - else why include them? But I never used them and all examples on this site and the docs never show a practical use of UpValues.
Can someone give me an example to see…
VF1
- 4,702
- 23
- 31
28
votes
1 answer
UpValues, TagSet and UpSet, what's the difference, when should you use them?
Some of the big mysteries of Universe Mathematica for me is the application of UpValues.
I know about this question and know the very poor Mathematica documentation on that. I'm very curious to know if someone that not @Leonid uses this too.
Just to…
Murta
- 26,275
- 6
- 76
- 166
6
votes
2 answers
How to customize derivative behavior via upvalues?
I'm having trouble getting customized derivatives (defined using upvalues) to behave in sane ways. By this I mean that I'd like to define a derivative using an upvalue and then have Mathematica apply all derivative rules it normally would,…
Tom
- 295
- 1
- 6
1
vote
0 answers
Overloading the Normal function
I am currently working on library that keeps functions in unevaluated form, e.g.
In: a = RhoVariable[s]
Out: RhoVariable[s]
RhoVariable has some definition, namely (2-Sqrt[4-s])/(2+Sqrt[4-s]) and I want to be able to convert it to that form using…
fqrt
- 84
- 2
1
vote
0 answers
Understanding TagSetDelayed
I was reading What is the distinction between DownValues, UpValues, SubValues, and OwnValues? and I started to be confused with the part "Upvalues" of the first answer.
Some of my confusion comes from the fact I don't really understand…
StarBucK
- 2,164
- 1
- 10
- 33
1
vote
1 answer
Is there a better way to overload Plus?
I'm writing a function to produce a more readable version of output which consists mainly of Plus[seq__] where seq__ matches-for the most part, but not exclusively- stuff like Times[-1,Log[f_[t_]]] or Log[f_[t_]]. The desired function has attribute…
user42582
- 4,195
- 1
- 10
- 31