// NewReal returns a mat64.Matrix representing the real part of m. If m is a Realer, // the real part is returned. func NewReal(m cmat128.Matrix) mat64.Matrix { if m, ok := m.(Realer); ok { return m.Real() } return Real{m} }
// NewImag returns a mat64.Matrix representing the imaginary part of m. If m is an Imager, // the imaginary part is returned. func NewImag(m cmat128.Matrix) mat64.Matrix { if m, ok := m.(Imager); ok { return m.Imag() } return Imag{matrix: m, conjSign: 1} }
// NewImage returns a mat64.Matrix representing the imaginary part of m. If m is an Imager, // the imaginary part is returned. func NewImag(m cmat128.Matrix) mat64.Matrix { if m, ok := m.(Imager); ok { return m.Imag() } return Imag{m} }