Manhattan | Image Quantization Library (image-q)

Manhattan distance

### Hierarchy

- Manhattan
  - ManhattanNeuQuant

### Implements

- IDistanceCalculator

## Index

### Constructors

- constructor

### Properties

- _Pa
- _Pb
- _Pg
- _Pr
- _maxManhattanDistance

### Methods

- _setDefaults
- calculateNormalized
- calculateRaw
- setWhitePoint

## Constructors

### constructor

- new Manhattan(): Manhattan

- - Defined in distance/manhattan.ts:19

  #### Returns Manhattan

## Properties

### Protected _Pa

_Pa: number

- Defined in distance/manhattan.ts:17

### Protected _Pb

_Pb: number

- Defined in distance/manhattan.ts:16

### Protected _Pg

_Pg: number

- Defined in distance/manhattan.ts:15

### Protected _Pr

_Pr: number

- Defined in distance/manhattan.ts:14

### Protected _maxManhattanDistance

_maxManhattanDistance: number

- Defined in distance/manhattan.ts:19

## Methods

### Protected _setDefaults

- _setDefaults(): void

- - Defined in distance/manhattan.ts:46

  #### Returns void

### calculateNormalized

- calculateNormalized(colorA: Point, colorB: Point): number

- - Defined in distance/manhattan.ts:32

  #### Parameters

  - ##### colorA: Point

  - ##### colorB: Point

  #### Returns number

### calculateRaw

- calculateRaw(r1: number, g1: number, b1: number, a1: number, r2: number, g2: number, b2: number, a2: number): number

- - Defined in distance/manhattan.ts:36

  #### Parameters

  - ##### r1: number

  - ##### g1: number

  - ##### b1: number

  - ##### a1: number

  - ##### r2: number

  - ##### g2: number

  - ##### b2: number

  - ##### a2: number

  #### Returns number

### setWhitePoint

- setWhitePoint(r: number, g: number, b: number, a: number): void

- - Defined in distance/manhattan.ts:28

  #### Parameters

  - ##### r: number

  - ##### g: number

  - ##### b: number

  - ##### a: number

  #### Returns void

Generated using TypeDoc