PropertyFunctions.jl

This package provides functionality for easy access to and efficient broadcasting over properties.

PropertyFunctions defines the macro @pf that can be used to quicky access properties of objects and broadcast efficiently over collections of objects, e.g. via xs .|> @pf $a + $c^2.

Broadcasting functions generated by @pf is GPU-friendly and will try to return a StructArray if the functional expressioin generates a struct (resp. a NamedTuple).

The package also provides convencience functions sortby and filterby that work well with functions generated by @pf (but are compatible with generic functions as well).