Interface MathMLMatrixElement

All Superinterfaces:
Element, MathMLContentElement, MathMLElement, Node
All Known Implementing Classes:
MathMLMatrixElementImpl

public interface MathMLMatrixElement extends MathMLContentElement
This interface represents the matrix element in MathML Content. A matrix is a rectangular array of elements.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • getNrows

      int getNrows()
      Returns the number of rows in this matrix.
      Returns:
      the number of rows.
    • getNcols

      int getNcols()
      Returns the number of columns in this matrix.
      Returns:
      the number of columns.
    • getRows

      MathMLNodeList getRows()
      Returns a list of the rows in this matrix.
      Returns:
      the list of rows.
    • getRow

      MathMLMatrixrowElement getRow(int index) throws DOMException
      Returns the index-th row of this matrix.
      Parameters:
      index - the index of the row to retrieve (1-based index).
      Returns:
      the row at the specified index.
      Throws:
      DOMException - INDEX_SIZE_ERR if the index is out of bounds.
    • insertRow

      MathMLMatrixrowElement insertRow(MathMLMatrixrowElement newRow, int index) throws DOMException
      Inserts a new row into the matrix at the specified index.
      Parameters:
      newRow - the new row to insert.
      index - the index at which the new row is to be inserted.
      Returns:
      the newly inserted row.
      Throws:
      DOMException - INDEX_SIZE_ERR if the index is out of bounds.
    • setRow

      MathMLMatrixrowElement setRow(MathMLMatrixrowElement newRow, int index) throws DOMException
      Replaces the row at the specified index with a new row.
      Parameters:
      newRow - the new row to set.
      index - the index of the row to replace.
      Returns:
      the newly set row.
      Throws:
      DOMException - INDEX_SIZE_ERR if the index is out of bounds.
    • deleteRow

      void deleteRow(int index) throws DOMException
      Deletes the row at the specified index.
      Parameters:
      index - the index of the row to delete.
      Throws:
      DOMException - INDEX_SIZE_ERR if the index is out of bounds.
    • removeRow

      MathMLMatrixrowElement removeRow(int index) throws DOMException
      Removes and returns the row at the specified index.
      Parameters:
      index - the index of the row to remove.
      Returns:
      the removed row.
      Throws:
      DOMException - INDEX_SIZE_ERR if the index is out of bounds.