- Vignette is now included.
- Hotfix in function
is_scalarwhich is an issue in packagejti
normalizenow returns1if applied to anumeric
- Bug fixed when mult/div two unities
- Bug fixed when calling
div(x,y)withxbeing a scalar. The result was the same asdiv(y,x). numericscan now be marginalized. The result is the numeric itself.
as_sparta.data.framedoes no longer convert to an array first (expensive) and is therfore much more efficient now.
margis now more efficient whenyischaracter(0)- A
sparta_unity_structcan now be sliced ifdropTRUE=. - Better argument checks in
slice multanddivis now faster when one of the tables is a subtale of the other. This is especially useful in connection with Bayesian networks and the Junction Tree Algorithm.sum, normalize, get_valsandvalsnow works as expected onsparta_unityclass- New functions:
sparta_rankandtable_size as_arraynow works forsparta_unity
- Bug fixed when argument
dropisTRUEinslicefor tables that should reduce to one row.
- The new print method turned out to cause problems in the long run. Printing a sparse table now prints columns as rows again with the corresponding value attached to the right.
- marginalizing is much more memory efficient now. Especially for massive tables.
- Multiplication of unity tables was not correct due to the new rank argument. The fix was to multiply the rank of the tables.
- Print method changed to print cells as columns which is also how the sparse tables are represented under the hood.
- New functions (see documentation):
sparsity: determines the ratio of non-zero cells and the size of the statespace.as_df: convert a sparse table to adata.frame. Either with or without zero cellsget_values: The same as the existingvals
-
unity tables now have a rank attribute which is just the unique value that all cells have. Because of this, a unity table can now be multiplied with a scalar. And regular sparta tables can be multiplied with unities of different rank. As a consequence, unities can now be marginalized also.
-
New function
equivto test if two sparta objects are identical -
Fixed a bug when assigning dimnames to the result of multiplication
- marginalization is now faster due to some refactoring
- Prevent print from printing dimension names
- A bug, due to wrong sorting, that manifested in both
marg,slice,multanddivhas been fixed. These functions were prone to errors when the number of variables exceed10. - It is now possible to multiply and divide sparta tables with a scalar where the scalar can be either of the two inputs. Prior to v0.6.0 the scalar had to be the second argument.
- First release