492 reputation
314
bio website
location Beijing, China
age
visits member for 2 years, 5 months
seen Nov 13 at 8:04

I am a graduate student studying condensed matter theory.


Nov
8
awarded  Curious
Nov
7
comment Slowdown of Flat attributed function
I did looked into the Trace, but I did not gain much insight. It seems that the pairing process is not shown in the Trace output.
Nov
7
revised Slowdown of Flat attributed function
Oderless is not the attribute discussed here, it should be Flat
Nov
7
suggested suggested edit on Slowdown of Flat attributed function
Nov
7
revised Slowdown of Flat attributed function
added 1137 characters in body
Nov
7
comment Slowdown of Flat attributed function
The changing of the result is another bug that I do not understand. The result 0 is not expected to change for any ordering (because f is modeling an Abelian group multiplication). I have to enforce the condition f[i_, j_] /; i != j to get the correct result, which is usually unnecessary given the definition of f[i_, i_] already. I do not understand the behavior here either.
Nov
7
awarded  Commentator
Nov
7
comment Slowdown of Flat attributed function
@gpap Thanks for your comment. The ordering of downvalue definitions indeed matters. Also f@@B evaluates to -2 is a bug. I do not expect the result to change. I found one has to enforce the condition i != j in the definition of f[i_, j_] in order to get the right result. But usually having defined f[i_, i_], f[i_, j_] is assumed to take different i and j. But I don't understand why it does not behave as expected here.
Nov
7
revised Slowdown of Flat attributed function
added 787 characters in body
Nov
7
comment Slowdown of Flat attributed function
@user18792 No, as explained in the document of Flat: "when functions that are Flat are used in pattern matching, they often also require the attribute OneIdentity", so removing OneIdentity will make the function ill defined. Even if OneIdentity is removed, the slowdown of f@@A is still there. My question is about the slowdown due to the Flat attribution. I don't think OneIdentity plays any role in this phenomenon.
Nov
7
asked Slowdown of Flat attributed function
Oct
10
answered Generate random nxn matrix with all negative eigenvalues
Sep
24
awarded  Autobiographer
Aug
21
awarded  Yearling
Jul
9
awarded  Nice Question
May
21
accepted 2D Visualization of links and knots
May
20
revised 2D Visualization of links and knots
added 1065 characters in body
May
20
asked 2D Visualization of links and knots
May
17
awarded  Notable Question
Apr
23
awarded  Nice Question