Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComplexInt32ArrayToString ¶
func ComplexInt32ArrayToString(cpx []ComplexInt32, width int) string
Formats a slice of ComplexInt32 as a string that can be used as a literal.
Types ¶
type ComplexImage ¶
type ComplexImage struct { // The "pixel" data. Pix []complex128 // The rectangle defining the bounds of the image. Rect image.Rectangle // The maximum modulus value that occurs in this image. This is useful // when computing a histogram of the modulus value. MaxMod float64 // Extreme values found in this image MinRe, MaxRe, MinIm, MaxIm float64 }
A ComplexImage is an image where each pixel is a Go complex128.
func FromComplexArray ¶
func FromComplexArray(cpx []complex128, width int) (dst *ComplexImage)
FromComplexArray wraps an array of complex numbers in a ComplexImage.
func ToShiftedComplex ¶
func ToShiftedComplex(src SippImage) (dst *ComplexImage)
ToShiftedComplex converts the input image into a ComplexImage, multiplying each pixel by (-1)^(x+y), in order for a subsequent FFT to be centred properly.
func (*ComplexImage) Render ¶
func (comp *ComplexImage) Render() (SippImage, SippImage)
Render renders the real and imaginary parts of the image as separate 8-bit grayscale images.
func (*ComplexImage) SetScaling ¶
func (comp *ComplexImage) SetScaling()
type ComplexInt32 ¶
A ComplexInt32 is a complex number with int32 real and imaginary parts.
func (ComplexInt32) Add ¶
func (a ComplexInt32) Add(b ComplexInt32) ComplexInt32
Adds a ComplexInt32 to this one, returning a new one.
func (ComplexInt32) Mult ¶
func (a ComplexInt32) Mult(b ComplexInt32) ComplexInt32
Multiplies a ComplexInt32 to this one, returning a new one.
func (ComplexInt32) Sub ¶
func (a ComplexInt32) Sub(b ComplexInt32) ComplexInt32
Subtracts a ComplexInt32 from this one, returning a new one.
type ComplexInt32Image ¶
type ComplexInt32Image struct { // The "pixel" data. Pix []ComplexInt32 // The rectangle defining the bounds of the image. Rect image.Rectangle // The maximum modulus value that occurs in this image. This is useful // when computing a histogram of the modulus value. We retain a float64 for // precision. MaxMod float64 // Extreme values found in this image MinRe, MaxRe, MinIm, MaxIm int32 }
A ComplexInt32Image is an image where each pixel is a ComplexInt32.
func FromComplexInt32Array ¶
func FromComplexInt32Array(cpx []ComplexInt32, width int) (dst *ComplexInt32Image)
FromComplexInt32Array wraps an array of complex numbers in a ComplexInt32Image.
func ToShiftedComplexInt32 ¶
func ToShiftedComplexInt32(src SippImage) (dst *ComplexInt32Image)
ToShiftedInt32Complex converts the input image into a ComplexInt32Image, multiplying each pixel by (-1)^(x+y), in order for a subsequent FFT to be centred properly.
func (*ComplexInt32Image) Render ¶
func (comp *ComplexInt32Image) Render() (SippImage, SippImage)
Render renders the real and imaginary parts of the image as separate 8-bit grayscale images.