- Vignette is now included.
- Hotfix in function
is_scalar
which is an issue in packagejti
normalize
now returns1
if applied to anumeric
- Bug fixed when mult/div two unities
- Bug fixed when calling
div(x,y)
withx
being a scalar. The result was the same asdiv(y,x)
. numerics
can now be marginalized. The result is the numeric itself.
as_sparta.data.frame
does no longer convert to an array first (expensive) and is therfore much more efficient now.
marg
is now more efficient wheny
ischaracter(0)
- A
sparta_unity_struct
can now be sliced ifdrop
TRUE=. - Better argument checks in
slice
mult
anddiv
is 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_vals
andvals
now works as expected onsparta_unity
class- New functions:
sparta_rank
andtable_size
as_array
now works forsparta_unity
- Bug fixed when argument
drop
isTRUE
inslice
for 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
equiv
to 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
,mult
anddiv
has 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