Skip to content

V0.4.0

Latest
Compare
Choose a tag to compare
@Konrad1991 Konrad1991 released this 30 Aug 15:53
· 26 commits to master since this release

Major Rewrite and Refactoring

CPP Code:

  • Rewritten large parts of the C++ code.
  • Improved memory management with several new classes handling memory on the heap.
  • Introduced support for bool, int, and double data types.
  • Migrated from C++17 to C++20, reducing lines of code.
  • Added traits to differentiate between r and l vectors, optimizing memory assignment.
  • Changed subsetting to use pointers and indices vectors, making it more efficient.
  • Designed the memory management system to allow for easy addition of new memory classes.

R Code:

  • Added the possibility for users to define types with six supported types: Logical, Int, Double, Logical Vector, Int Vector, and Double Vector.
  • Users can declare types when defining variables using var::type.
  • Improved argument passing to the ast2ast function to allow more detailed declarations.

Error Management:

  • Enhanced error management throughout the codebase.

Future Plans:

  • Further improvements to the R code for robustness and potential complete rewrite.
  • Consider changing variable declaration syntax to var %type% "type".
  • Enhancing the subsetting mechanism to make it even more lazy.

Derivative Calculation System:

The functionality of the J function has been replaced with a more flexible system for calculating derivatives. The key components are:

  • set_indep(x): Sets x as the independent variable.
  • get_deriv(var): Retrieves the derivative of var with respect to x.
  • unset_indep(x): Unsets the independent variable.

Example Usage:

set_indep(x)
y = x * x
assign(y, get_deriv(x) * x + x * get_deriv(x))
unset_indep(x)