Skip to content

Conversation

@shashi
Copy link
Member

@shashi shashi commented Jan 9, 2022

julia> using Symbolics

julia> Symbolics.show_arrayop[] = true
true

julia> @variables X[1:10,1:5] Y[1:5, 1:10] b[1:10];

julia> (X*Y)*b
(@arrayop(_[i] := (@arrayop(_[i,j] := X[i, k]*Y[k, j]))[i, k]*b[k]))[1:10]

julia> r = @array_rule ((~A*~B)*~C) => (~A*(~B*~C)) where size(~A,1)*size(~B,2) > size(~B,1)*size(~C,2)
ArrayRule((~A * ~B) * ~C => ((~A * (~B * ~C)) where size(~A, 1) * size(~B, 2) > size(~B, 1) * size(~C, 2)))

julia> r((X*Y)*b)
@arrayop(_[i] := X[i, k]*(@arrayop(_[i] := Y[i, k]*b[k]))[k])

@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2022

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.22%. Comparing base (9f0e36e) to head (d045c03).
Report is 1305 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #495      +/-   ##
==========================================
+ Coverage   77.00%   78.22%   +1.22%     
==========================================
  Files          22       22              
  Lines        2270     2301      +31     
==========================================
+ Hits         1748     1800      +52     
+ Misses        522      501      -21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shashi shashi changed the title WIP: @array_rule WIP: Array @rules Jan 15, 2022
@shashi shashi merged commit b034276 into master Jan 17, 2022
@shashi shashi deleted the s/array-rules branch January 17, 2022 14:49
@shashi shashi changed the title WIP: Array @rules Get @rule to work on Array expressions Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants