# ScatterMode

`import { ScatterMode } from "destack:tensor";`

Update mode for tensor scatter.

```ds title="ScatterMode"
export enum ScatterMode {
    Replace = 1,
    Add = 2,
    Multiply = 3,
    Min = 4,
    Max = 5,
    And = 6,
    Or = 7,
    Xor = 8,
}
```

[language/library/src/tensor/mode.ds:18:35](https://github.com/destack-sh/destack/blob/main/language/library/src/tensor/mode.ds#L18-L35)

## Variants

### `Replace = 1`

Replace the destination element.

### `Add = 2`

Add to the destination element.

### `Multiply = 3`

Multiply the destination element.

### `Min = 4`

Store the minimum of destination and update.

### `Max = 5`

Store the maximum of destination and update.

### `And = 6`

Bitwise AND with destination.

### `Or = 7`

Bitwise OR with destination.

### `Xor = 8`

Bitwise XOR with destination.
