Skip to content

Releases: Alipsa/matrix

Matrix-spreadsheet 1.0.3

31 Oct 16:31
Compare
Choose a tag to compare
  • Add import ODS and XLSX from an InputStream
  • Add import multiple sheets from an InputStream for both ods and xlsx
  • fix bug when firstRowAsColumnNames is false (was off by one)
  • adapt to matrix-core 2.0.0

Matrix-stats 1.0.2

31 Oct 17:29
Compare
Choose a tag to compare
  • adapt to matrix 2.0.0
  • Implement GoalSeek

Matrix-sql 1.0.1

31 Oct 17:19
Compare
Choose a tag to compare
  • return a map of some info from create table.
  • NPE fix in MatrixSql.
  • Upgrade dependencies
  • implement support for conversion of a Matrix to a ResultSet
    • adapt to matrix 2.0.0

Matrix-datasets v 1.0.4

31 Oct 15:00
Compare
Choose a tag to compare
  • adapt to new matrix 2x style creation using builders

Matrix-csv 1.0.1, Matrix Json 1.0.0

31 Oct 15:46
Compare
Choose a tag to compare

Matrix csv

  • adapt to matrix-core 2.0.0

Matrix-json

  • initial release

Matrix-core 2.0.0

31 Oct 10:59
Compare
Choose a tag to compare

Note: there are several (minor) api breaking changes due to extensive cleanup and consistency fixes
This release was mainly guided by a big port of an R based budget planning and reporting application
to Groovy powered by Matrix (resulting in a code reduction with about 20% and a significant increase in performance).

  • add constructor to create an empty Matrix with only name and the column names defined
  • Breaking change: change Grid semantics so that getAt and putAt mean the same thing
    it was so that getAt (X = grid[0]) gets the row and putAt (grid[0] = X) puts the column
    but now both refers to the row.
  • Added replaceColumn method to compensate for the change in putAt semantics for a Grid
  • add dimensions() method to Grid and Matrix returning a Map of number of observations and variables
  • add typed get at (e.g: myMatrix[0, 1, String]) using the ValueConverter to convert
  • add ValueConverter for Long
  • add Matrix.removeEmptyColumns
  • add type conversion to Row (using the GroovyExtension mechanism to get the short notation to work as well)
  • Fix Grid declaration (should implement Iterable<List> not Iterable)
  • Changed Matrix.apply() and Matrix.subset() to apply to Row instead of a generic list
  • Fix index adjustment for Matrix.dropColumns()
  • safeguard Matrix maxContentLength from NPE when the column name is null
  • Add several Java classes to make is much easier (and more Groovy like) to use a
    Matrix from Java code. See MatrixJavaTest for details
  • Overload ListConverter methods, align naming and parameter order.
  • Add Matrix.getAt for column with type conversion.
  • Add NumberFormat as optional argument to OdsImporter.importOdsSheets and ValueConverter.isNumeric()
  • Add a Grid.add(int, List) and Matrix.addRow(int, List) to allow for inserting a row at the designated place.
  • Add ValueTwoArgClosure to enable more elegant Java code.
  • Fix Matrix.content() and head() to pretty print the column names
  • add Matrix.removeRows()
  • change columnCount to count number of columns instead of number of columnNames
  • add size check to Matrix.create()
  • add check for missing column in Matrix.dropColumns()
  • Modify Matrix.addColumns to include all columns from the supplied matrix if no columns are specified
  • Fix bug in Matrix.diff() and add check for number of columns
  • Breaking change: Add a builder to Matrix and remove all static create methods and constructors as a result
  • change Matrix.columnTypes() to Matrix.types()
  • add putAt for ranges (e.g. myMatrix[0..2] = otherMatrix[1..3])
  • change putAt to allow for add operations i.e. it is now possible to add an element using e.g. myMatrix[1,2] = 'Foo'
    note that the element to add must be at the size of the column i.e. it is not possible to do myMatrix[2,2] = 'Foo'
    if there is only 1 row in the matrix.
  • Add Stat.apply() for various column operations (i.e. do something with values from two columns and assign the result to a third column)
  • Add Matrix.dropColumns(IntRange columnIndices)
  • Add Matrix.convert() for IntRange and individual column index, add formatters to the convert method taking a column name
  • Change Matrix.diff() formatting for easier reading
  • Add Matrix.columns(IntRange range) to get the specified range of columns
  • Change equals to compare values and add a parameter for allowed diff used when comparing numbers
  • add lastRowIndex and LastColumnIndex as convenience methods for rowCount -1 and ColumnCount -1 respectively
  • add getAt for a range of rows or a range of columns
  • add a MatrixBuilder.data() method for when the data is a list of custom objects
  • Breaking change: changed some Matrix methods (e.g. the convert, apply, removeRows and orderBy methods) to mutate to make things more consistent
  • Add Matrix.moveRow()
  • Add Matrix.subset() for an IntRange of rows
  • Enable using ginq by overriding get and set Property on a Row
  • add support in MatrixBuilder for building from an existing Matrix
  • add option to set default value if null to matrix getAt methods
  • add support for null substitution to Matrix.convert() methods by overloading them.
  • add MatrixBuilder.rowList to create a Matrix from a List of Rows
  • Matrix.findFirstRow() now returns a Row instead of a List<?>
  • Add Stat sumRows, meanRows, medianRows and ensure that median calculations no longer depends on a
    sorted list by always sorting it internally
  • Override getProperty for Matrix allowing the column to be accessed by dot notation
  • Breaking change: Rename Matrix.getName() to Matrix.getMatrixName, setName() -> setMatrixName, withName() -> withMatrixName()
    to not collide with the common column name "name". Hence, myMatrix.name now refers to the column 'name' (if any) and
    myMatrix.matrixName refers to the name ot the Matrix.
  • add Matrix withColumn(String, Closure), withColumn(int columnIndex, Closure operation), withColumns(IntRange, Closure)
  • add Matrix.selectColumns(IntRange range), Matrix.columnNames(IntRange)
  • enable short notation for adding a row. Both myMatrix.columnName = [1,2,3] and myMatrix['columnName'] = [1,2,3] works
  • Breaking change: change sublist from min, max of range to the entire range (max excludes the last value) to be
    consistent with the way IntRanges are handled w.r.t. collections in Groovy
  • bugfix for putAt when supplying null as value e.g. myMatrix[0,2] = null or myMatrix[0,'columnName'] = null
  • Breaking change: leftShift (short notation <<) now only refers to column operations so removed the
    "add row" since that is already covered with plus and added a leftshift for a Matrix. Plus is no longer mutating as
    this m + [1,2,3] does not look intuitive, instead you need to do m = m + [1,2,3] which is much easier to read.
    Plus (+) operations pertains to rows, left shift (<<) refers to columns.
  • Add a column type that extends ArrayList that can do arithmetic operations on individual elements
  • Removed Generics <?> constraints for List and Class as it was not adding value, just made the code harder to read
  • Breaking change: change methodName Matrix.selectRowIndices to Matrix.rowIndices
  • add leftShift short notation to add a column to a Matrix
  • cleanup Row by removing the getString, getInt and getObject methods
  • add support for converting nulls to specified value in Row.getAt
  • add Row.toMap() to get a Map<String, ?> representation of the row
  • Matrix.columnNames(Class type) to get all column names matching the type (including subclasses)

Matrix-spreadsheet 1.0.2

07 Jul 09:01
Compare
Choose a tag to compare
  • Consistently use index starting with 1 in the user api

Core 1.2.4, dataset 1.0.3, stats 2.0.1, sql 1.0.0

04 Jul 19:53
Compare
Choose a tag to compare

Matrix-core 1.2.4

  • add plus override to Matrix allow for easy ways to append a row or append all rows from another matrix
  • add constructor for an empty Matrix

Matrix-dataset v1.0.3,

  • add cars dataset
  • change datatype for month and day of airquality to Short

Matrix-stats v1.0.1

  • Implement Accuracy.evaluatePredictions
  • Add DecisionTree and Randomize to support LineCharts

Matrix-sql v1.0.0

  • initial release

Full Changelog: Matrix-spreadsheet_1.0.2...2024-07-04

Matrix-spreadsheet 1.0.2

21 Nov 07:57
Compare
Choose a tag to compare
  • Change index of the SpreadsheetImporter to start with 1
  • Name the imported Matrix after the sheet name

Ver 1.1.2

05 Aug 18:39
Compare
Choose a tag to compare

allow min and max to work on all comparables
add ignoreNonNumerics param to min functions
add List toDoubles(...) and double[] toDoubleArray(...) to list converter