MATSIM
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
org.matsim.matrices.Matrices Class Reference

Public Member Functions

final Matrix createMatrix (final String id, final String desc)
 
final String getName ()
 
final TreeMap< String, MatrixgetMatrices ()
 
final Matrix getMatrix (final String id)
 
final String toString ()
 

Protected Member Functions

final void setName (final String name)
 

Private Attributes

String name = null
 
final TreeMap< String, Matrixmatrices = new TreeMap<String, Matrix>()
 

Detailed Description

Definition at line 25 of file Matrices.java.

Member Function Documentation

◆ createMatrix()

final Matrix org.matsim.matrices.Matrices.createMatrix ( final String  id,
final String  desc 
)

Definition at line 38 of file Matrices.java.

Referenced by org.matsim.matrices.MatricesReaderMatsimV1< T >.startMatrix().

38  {
39  // check id string for uniqueness
40  if (this.matrices.containsKey(id)) {
41  throw new RuntimeException("[id="+id+" already exists.]");
42  }
43  // create the matrix
44  Matrix m = new Matrix(id, desc);
45  this.matrices.put(id,m);
46  return m;
47  }
final TreeMap< String, Matrix > matrices
Definition: Matrices.java:32

◆ setName()

final void org.matsim.matrices.Matrices.setName ( final String  name)
protected

Definition at line 53 of file Matrices.java.

References org.matsim.matrices.Matrices.name.

Referenced by org.matsim.matrices.MatricesReaderMatsimV1< T >.startMatrices().

53  {
54  this.name = name;
55  }

◆ getName()

final String org.matsim.matrices.Matrices.getName ( )

Definition at line 61 of file Matrices.java.

References org.matsim.matrices.Matrices.name.

61  {
62  return this.name;
63  }

◆ getMatrices()

final TreeMap<String, Matrix> org.matsim.matrices.Matrices.getMatrices ( )

Definition at line 65 of file Matrices.java.

References org.matsim.matrices.Matrices.matrices.

Referenced by org.matsim.matrices.MatricesWriter.write().

65  {
66  return this.matrices;
67  }
final TreeMap< String, Matrix > matrices
Definition: Matrices.java:32

◆ getMatrix()

final Matrix org.matsim.matrices.Matrices.getMatrix ( final String  id)

Definition at line 69 of file Matrices.java.

69  {
70  return this.matrices.get(id);
71  }
final TreeMap< String, Matrix > matrices
Definition: Matrices.java:32

◆ toString()

final String org.matsim.matrices.Matrices.toString ( )

Definition at line 78 of file Matrices.java.

78  {
79  return "[name=" + this.name + "]" +
80  "[nof_matrices=" + this.matrices.size() + "]";
81  }
final TreeMap< String, Matrix > matrices
Definition: Matrices.java:32

Member Data Documentation

◆ name

String org.matsim.matrices.Matrices.name = null
private

◆ matrices

final TreeMap<String, Matrix> org.matsim.matrices.Matrices.matrices = new TreeMap<String, Matrix>()
private

Definition at line 32 of file Matrices.java.

Referenced by org.matsim.matrices.Matrices.getMatrices().


The documentation for this class was generated from the following file: