# Class AbstractVertex<V>`Abstract`

#### Type Parameters

- #### V = any

#### Hierarchy

- AbstractVertex
  - DirectedVertex
  - UndirectedVertex

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

#####
Index

### Constructors

constructor

### Properties

_id
_val

### Accessors

id
val

## Constructors

### `Protected` constructor

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

- The function is a protected constructor that takes an id and an optional value as parameters.

  #### 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 object.

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

    The parameter "val" is an optional parameter of type V. It is used to assign a value to the vertex. If no value is provided, it will be set to undefined.

  #### Returns AbstractVertex<V>

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

## Properties

### `Private` _id

_id: VertexId

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

### `Private` _val

_val: undefined | V

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

## Accessors

### id

- get id(): VertexId

- #### Returns VertexId

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

- #### Parameters

  - ##### v: VertexId

  #### Returns void

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

### val

- get val(): undefined | V

- #### Returns undefined | V

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

- #### Parameters

  - ##### value: undefined | V

  #### Returns void

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

Generated using TypeDoc