Constructor
new Edge(sourceId, targetId, weightopt)
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
id |
Number | The id of this edge. |
||
sourceId |
Number | The id of the source vertex. |
||
targetId |
Number | The id of the target vertex. |
||
weight |
Number | The weight of this edge. |
||
bondType |
String |
<optional> |
'-'
|
The bond type of this edge. |
isPartOfAromaticRing |
Boolean |
<optional> |
false
|
Whether or not this edge is part of an aromatic ring. |
center |
Boolean |
<optional> |
false
|
Wheter or not the bond is centered. For example, this affects straight double bonds. |
chiral |
String |
<optional> |
''
|
Chirality information. |
The constructor for the class Edge.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
sourceId |
Number | A vertex id. |
||
targetId |
Number | A vertex id. |
||
weight |
Number |
<optional> |
1
|
The weight of the edge. |
Members
(static) bonds
An object mapping the bond type to the number of bonds.
Methods
getBondCount() → {Number}
Returns the number of bonds associated with the bond type of this edge.
Returns:
The number of bonds associated with this edge.
- Type
- Number