fiery.bounds.indexing
This module contains functions that wrap out-of-bound indices back in-bounds, according to some boundary condition.
Functions:
| Name | Description |
|---|---|
replicate |
|
dft |
|
dct1 |
Apply DCT-I boundary conditions to an index.
Alias: |
dct2 |
Apply DCT-II boundary conditions to an index.
Aliases:
|
dst1 |
Apply DST-I boundary conditions to an index.
Alias: |
dst2 |
Apply DST-II boundary conditions to an index.
Aliases:
|
nocheck |
Do not wrap indices (assume they are inbounds) |
Attributes
Functions:
replicate
Apply replicate (nearest/border) boundary conditions to an index
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
i
|
int or tensor
|
Index |
required |
n
|
int
|
Length of the field of view |
required |
Returns:
| Name | Type | Description |
|---|---|---|
i |
int or tensor
|
Index that falls inside the field of view [0, n-1] |
s |
{1, 0, -1}
|
Sign of the transformation (always 1 for replicate) |
dft
Apply DFT (circulant/wrap) boundary conditions to an index
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
i
|
int or tensor
|
Index |
required |
n
|
int
|
Length of the field of view |
required |
Returns:
| Name | Type | Description |
|---|---|---|
i |
int or tensor
|
Index that falls inside the field of view [0, n-1] |
s |
{1, 0, -1}
|
Sign of the transformation (always 1 for dft) |
dct2
Apply DCT-II (reflect) boundary conditions to an index
Aliases
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
i
|
int or tensor
|
Index |
required |
n
|
int
|
Length of the field of view |
required |
Returns:
| Name | Type | Description |
|---|---|---|
i |
int or tensor
|
Index that falls inside the field of view [0, n-1] |
s |
{1, 0, -1}
|
Sign of the transformation (always 1 for dct2) |
dct1
Apply DCT-I (mirror) boundary conditions to an index
Aliases
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
i
|
int or tensor
|
Index |
required |
n
|
int
|
Length of the field of view |
required |
Returns:
| Name | Type | Description |
|---|---|---|
i |
int or tensor
|
Index that falls inside the field of view [0, n-1] |
s |
{1, 0, -1}
|
Sign of the transformation (always 1 for dct1) |
dst1
Apply DST-I (antimirror) boundary conditions to an index
Aliases
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
i
|
int or tensor
|
Index |
required |
n
|
int
|
Length of the field of view |
required |
Returns:
| Name | Type | Description |
|---|---|---|
i |
int or tensor
|
Index that falls inside the field of view [0, n-1] |
s |
[tensor of] {1, 0, -1}
|
Sign of the transformation |
dst2
Apply DST-II (antireflect) boundary conditions to an index
Aliases
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
i
|
int or tensor
|
Index |
required |
n
|
int
|
Length of the field of view |
required |
Returns:
| Name | Type | Description |
|---|---|---|
i |
int or tensor
|
Index that falls inside the field of view [0, n-1] |
s |
[tensor of] {1, 0, -1}
|
Sign of the transformation |