# Class DirectedVertex<V>

#### Type Parameters

- #### V = any

#### Hierarchy

- AbstractVertex<V>
  - DirectedVertex
    - MapVertex

- Defined in src/data-structures/graph/directed-graph.ts:13

#####
Index

### Constructors

constructor

### Accessors

id
val

## Constructors

### constructor

- new DirectedVertex<V>(id, val?): DirectedVertex<V>

- The constructor function initializes a vertex with an optional value.

  #### Type Parameters

  - #### V = any

  #### Parameters

  - ##### id: VertexId

    The `id` parameter is of type `VertexId` and represents the identifier of the vertex. It is used to uniquely identify the vertex within a graph or data structure.

  - ##### `Optional` val: V

    The "val" parameter is an optional parameter of type V. It is used to initialize the value of the vertex. If no value is provided, the vertex will be initialized with a default value.

  #### Returns DirectedVertex<V>

  Overrides AbstractVertex.constructor

  - Defined in src/data-structures/graph/directed-graph.ts:21

## Accessors

### id

- get id(): VertexId

- #### Returns VertexId

  Inherited from AbstractVertex.id

  - Defined in src/data-structures/graph/abstract-graph.ts:28
- set id(v): void

- #### Parameters

  - ##### v: VertexId

  #### Returns void

  Inherited from AbstractVertex.id

  - Defined in src/data-structures/graph/abstract-graph.ts:32

### val

- get val(): undefined | V

- #### Returns undefined | V

  Inherited from AbstractVertex.val

  - Defined in src/data-structures/graph/abstract-graph.ts:38
- set val(value): void

- #### Parameters

  - ##### value: undefined | V

  #### Returns void

  Inherited from AbstractVertex.val

  - Defined in src/data-structures/graph/abstract-graph.ts:42

Generated using TypeDoc