Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 04 05:55

    axkr on master

    basic JUnit tests for Associati… (compare)

  • Dec 01 18:42

    axkr on master

    Improve SameQ() for 2 arguments (compare)

  • Dec 01 18:07

    axkr on master

    Let SameQ(), SameQ(a1), UnsameQ… Cofactort, Minors "normalize" s… (compare)

  • Dec 01 06:23
    tranleduy2000 closed #332
  • Dec 01 05:52
    tranleduy2000 opened #332
  • Nov 30 17:57

    axkr on master

    #331 fix bug in Minors (compare)

  • Nov 29 18:59

    axkr on master

    #331 WIP first Minors() impleme… (compare)

  • Nov 29 18:20

    axkr on master

    #329 improved elimzeroplus rules (compare)

  • Nov 29 06:00

    axkr on master

    #331 WIP Cofactor first impleme… (compare)

  • Nov 29 02:31
    tranleduy2000 labeled #331
  • Nov 29 02:31
    tranleduy2000 opened #331
  • Nov 28 17:55

    axkr on master

    Fix bugs found by SpotBugs (compare)

  • Nov 28 13:57

    axkr on master

    fix bug in PatternMatcher#remov… #329 clean up / rename elimzero… (compare)

  • Nov 28 06:34

    axkr on master

    #329 use PossibleZeroQ to deter… (compare)

  • Nov 28 05:58

    axkr on master

    #329 handle possible denominato… (compare)

  • Nov 28 05:46

    axkr on master

    #329 added more general rules f… (compare)

  • Nov 28 01:10
    tranleduy2000 commented #330
  • Nov 27 12:30

    axkr on master

    #330 return Indeterminate as su… (compare)

  • Nov 27 12:29
    axkr commented #330
  • Nov 27 12:27
    axkr commented #330
TiMauzi
@TiMauzi
@axkr So there is not much of a difference whether I place the ApfloatContext test before or after ExprEvaluator
Axel Kramer
@axkr
This seems to come from the apfloat library:
Can you open an issue where and ask how to set the properties to avoid that error, because I don't find a properties file in the apfloat's JAR itself.
TiMauzi
@TiMauzi
@axkr Although I'd like to take your advice and creating a modification of Symja meanwhile... Though, it would be more elegant of course if I could use an original version at some point :)
Axel Kramer
@axkr
Yes of course. You can contribute your changes back with a pull request to Symja if you create a fork on github.
TiMauzi
@TiMauzi
Mhm that might be a good idea... Although I usually use my university's gitlab, I can of course create my symja fork on github :)
TiMauzi
@TiMauzi
@axkr Added you to my fork :)
TiMauzi
@TiMauzi
@axkr The creator of apfloat answered btw :)
TiMauzi
@TiMauzi
@axkr I tried his 4th option, adding the line implementation "org.apfloat:apfloat-applet:1.9.1" to my build.gradle. I think it changed something, but I got a new Symja-related error:
[2021-05-15T01:57:51,755][WARN ][stderr                   ] [TIM] java.lang.NoClassDefFoundError: org/codehaus/commons/compiler/CompileException
[2021-05-15T01:57:51,755][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.builtin.CompilerFunctions$Initializer.init(CompilerFunctions.java:76)
[2021-05-15T01:57:51,756][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.builtin.CompilerFunctions$Initializer.access$200(CompilerFunctions.java:72)
[2021-05-15T01:57:51,756][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.builtin.CompilerFunctions.initialize(CompilerFunctions.java:84)
[2021-05-15T01:57:51,757][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.expression.F.<clinit>(F.java:910)
[2021-05-15T01:57:51,757][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.eval.ExprEvaluator.<clinit>(ExprEvaluator.java:133)
...
[2021-05-15T01:57:51,769][WARN ][stderr                   ] [TIM] Caused by: java.lang.ClassNotFoundException: org.codehaus.commons.compiler.CompileException
...
TiMauzi
@TiMauzi
But I'm checking the class imports at the moment, because I'm feeling suspicious that it has something to do with that
that is part of the Janino compiler
TiMauzi
@TiMauzi
Yes, I found that out, too. Funny thing: Janino is imported perfectly. It's just the "commons" part that doesn't work. I'm at the moment trying if it works when I add this particular artifact
I think it's an Elasticsearch thing with transitive imports again, that just the parent library is importet but not the libraries called by the parent
TiMauzi
@TiMauzi
Yes baby!
[2021-05-15T02:35:13,743][INFO ][stdout                   ] [TIM] doToQuery()
[2021-05-15T02:35:13,745][INFO ][stdout                   ] [TIM] transcribe()
[2021-05-15T02:35:13,745][INFO ][stdout                   ] [TIM] transcribe()
[2021-05-15T02:35:13,746][INFO ][stdout                   ] [TIM] (matchquery$$fuchs&&(matchquery$$schaf||(!matchquery$$schaf&&matchquery$$huhn)))||(!matchquery$$matchquery$$fuchs&&matchquery$$schaf&&matchquery$$wolf)
[2021-05-15T02:35:13,776][INFO ][stdout                   ] [TIM] CommutingQuantumQuery
[2021-05-15T02:35:13,788][INFO ][stdout                   ] [TIM] CommutingQuantumWeight
[2021-05-15T02:35:13,790][INFO ][stdout                   ] [TIM] CommutingQuantumScorer
[2021-05-15T02:35:13,791][INFO ][stdout                   ] [TIM] score()
... no class errors here anymore! :tada:
[2021-05-15T02:35:14,733][INFO ][stdout                   ] [TIM] Index 1 out of bounds for length 1
[2021-05-15T02:35:14,742][WARN ][r.suppressed             ] [TIM] path: /fables/_search, params: {index=fables}
org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
        at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:661) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
...
Caused by: java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Float (java.lang.Integer and java.lang.Float are in module java.base of loader 'bootstrap')
        at org.elasticsearch.index.search.CommutingQuantumScorer.score(CommutingQuantumScorer.java:91) ~[?:?]
...
Just my own programming mistakes for now
And yes, using the janino commons-compiler artifact worked :)
@axkr So that means, that I actually can use your original Symja (if nothing unexpected happens anymore) :)
Axel Kramer
@axkr
@TiMauzi go ahead ;-)
Axel Kramer
@axkr
@TiMauzi bumped version to 2.0.0-SNAPSHOT because of other Maven module partition:
https://github.com/axkr/symja_android_library#license
TiMauzi
@TiMauzi
@axkr There might be a problem with the new version. I upgraded it in my build.gradle and suddenly, the following doesn't evaluate anymore:
Variables(termquery$$fuchs*(termquery$$huhn*(1-termquery$$schaf)+termquery$$schaf)+(1-termquery$$fuchs)*termquery$$schaf*termquery$$wolf)
Of course, it should output {termquery$$fuchs,termquery$$huhn,termquery$$schaf,termquery$$wolf} which works here: http://matheclipse.org/
TiMauzi
@TiMauzi
I had to go back to 1.0.0-SNAPSHOT for now, because there everything works flawlessly
While in 1.0.0-SNAPSHOT, the line IExpr varsExpr = calcEvaluator.eval("Variables(" + calc + ")"); evaluates to {termquery$$fuchs,termquery$$huhn,termquery$$schaf,termquery$$wolf}, the same code in 2.0.0-SNAPSHOT evaluates to just Variables(termquery$$fuchs*(termquery$$huhn*(1-termquery$$schaf)+termquery$$schaf)+(1-termquery$$fuchs)*termquery$$schaf*termquery$$wolf)
(calc is of course my test string "termquery$$fuchs*(termquery$$huhn*(1-termquery$$schaf)+termquery$$schaf)+(1-termquery$$fuchs)*termquery$$schaf*termquery$$wolf" in the examples above)
Axel Kramer
@axkr
@TiMauzi in this JUnit test I cannot reproduce the problem:
Can you create a minimal example which reproduces the error?
And set Config.DEBUG=true at the beginning?
TiMauzi
@TiMauzi
I saw that a class named "org/unbescape/html/HtmlEscape" is missing for me. In which part of Symja is this implemented?
TiMauzi
@TiMauzi
@axkr Okay, turns out the problem was, as often happens, that Elasticsearch didn't load the new transitive dependencies from Symja 2.0.0-SNAPSHOT, it was just a bit less visible this time. Sorry for taking away your time!
Xipeng Shen
@xipengshen

Hi, Is. there a plan to support Matrix Calculus in Symja, where, a matrix or vector can be manipulated as a whole? Such a support exists in Sympy, as illustrated as follows:

X = MatrixSymbol('X', 3, 3)
Y = MatrixSymbol('Y', 3, 3)
(X.TX).IY. would give 𝑋^(−1) (𝑋^𝑇)^(−1) 𝑌 // where, X.T is transpose(X); X.I is inverse(X)

What would be even better is to support the formulae in Matrix Calculus for differentiations of Matrix expressions (https://en.wikipedia.org/wiki/Matrix_calculus), such as

        D(transpose(a)*X*b, X) 

would produce
b*transpose(a)
where a and b are two vectors and X is a matrix of compatible shapes.
Such a support would make Symja very useful in Differentiable Programming of tensor-based programs.

For symbolic manipulation you can load packages with transformation rules or do you mean standard predefined "automatic" transformation rules?
Xipeng Shen
@xipengshen
@axkr Thanks for the response. My understanding is that those functions operate on each element of a matrix, but are not manipulating a matrix as a whole. In my example D(transpose(a)Xb, X)=b*transpose(a), X is a matrix symbolically represented, and a and b are two vectors symbolically represented. They are not instantiated with content.
@axkr In another word, a matrix or a vector in an expression would be treated as a single symbol in the manipulation.
Axel Kramer
@axkr
no there is not. I could imagine implementing this on the base of "assumption" definitions. Something like:
$Assumptions = {Element(M, Matrices({3, 3}, Reals))}
where M is defined as 3x3 matrix
and using this in some functions:
TensorDimensions(M)
Xipeng Shen
@xipengshen

@axkr Thanks for the thought. I've filed a feature request. The implementation is probably not too complicated, but does have some subtle aspects (e.g., matrix layout conventions: https://en.wikipedia.org/wiki/Matrix_calculus#Layout_conventions ).

So far, I haven't found an open-source tool with a full support of that feature. Sympy's support is incomplete. MatrixCalculus (http://www.matrixcalculus.org/) has a good support, but is not open-sourced. If Symja implements it, it could be the first open-source tool with that feature.

Axel Kramer
@axkr
@xipengshen I've not looked at it in detail, but does it help, if we can get this package to run in Symja:
Xipeng Shen
@xipengshen
@axkr Yes, a quick look seems to suggest that it could do the job. I'm not sure how complete its support is, but it seem to cover some important cases. A good finding!
Xipeng Shen
@xipengshen
The installation instruction of Symja seems to be only about installation on Windows. Is it installable on Linux and Mac?
Axel Kramer
@axkr
@xipengshen yes, I'm using it on Windows. But as it only requires a Java 8 installation it should also work an Linux and Mac. I still only have Windows *.bat scripts created in the releases. If you port these to Linux *.sh shell scripts it should also work.
Xipeng Shen
@xipengshen
@axkr Got it. Thanks! BTW, I saw that there are Mathmatica and Matlab code in the repo. Are they included in Symja? Do I need to install Wolfram Engine to use Symja?
Axel Kramer
@axkr
no you don't need to install it