@PublicAPI public abstract class BondTable extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_VALUE
The default (null) value in the matrix.
|
Modifier and Type | Method and Description |
---|---|
BondTable |
clone() |
static BondTable |
cloneBondTable(BondTable bondTable)
Clones the bond table.
|
static BondTable |
createBondTable(int atomCount,
int bondCount)
Creates a new bond table for a molecule graph with the specified number of atoms and bonds.
|
int[][] |
createMatrixArray()
Deprecated.
as of version 20.22, no replacement
|
int |
getAtomCount()
Returns the number of atoms in the molecule this bond table represents.
|
abstract int |
getBondIndex(int i,
int j)
Returns the index of the bond connecting two atoms, or -1 if
the two atoms are not connected.
|
int[][] |
getMatrixArray()
Deprecated.
as of version 20.22, no replacement
|
void |
setBondIndex(int i,
int j,
int bondIndex)
Sets the index of the bond connecting two atoms.
|
public static final int DEFAULT_VALUE
public static BondTable createBondTable(int atomCount, int bondCount)
atomCount
- the number of atoms (the number of rows and columns of the matrix)bondCount
- the number of bonds (required for the selection of optimized implementations)public static BondTable cloneBondTable(BondTable bondTable)
bondTable
- the matrix to copy, has to be not null.public final int getAtomCount()
@Deprecated @SubjectToRemoval(date=JAN_01_2022) public final int[][] getMatrixArray()
The returned matrix consumes a lot of memory for (very) large molecules, so do not use this method.
@Deprecated @SubjectToRemoval(date=JAN_01_2022) public int[][] createMatrixArray()
The returned matrix consumes a lot of memory for (very) large molecules, so do not use this method.
public abstract int getBondIndex(int i, int j)
i
- the first atom indexj
- the second atom indexpublic final void setBondIndex(int i, int j, int bondIndex)
i
- index of the first atomj
- index of the second atombondIndex
- index of the bond connecting atoms i and jpublic BondTable clone()
clone
in class java.lang.Object