Class/Object

cogx.compiler.parser.syntaxtree

ComplexField

Related Docs: object ComplexField | package syntaxtree

Permalink

class ComplexField extends Field with CompilerError with SemanticError

A multidimensional array of complex numbers.

Linear Supertypes
Field, CogOperatorAPI, FieldParameters, FieldName, ImplicitConversions, RecurrenceTrait, SemanticError, CompilerError, Hyperedge[Operation], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ComplexField
  2. Field
  3. CogOperatorAPI
  4. FieldParameters
  5. FieldName
  6. ImplicitConversions
  7. RecurrenceTrait
  8. SemanticError
  9. CompilerError
  10. Hyperedge
  11. AnyRef
  12. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ComplexField(layers: Int, rows: Int, columns: Int, f: (Int, Int, Int) ⇒ cogmath.algebra.complex.Complex)

    Permalink

    Create a 3D field of complex numbers.

    Create a 3D field of complex numbers.

    layers

    Layers in field.

    rows

    Rows in field.

    columns

    Columns in field.

    f

    Function which returns a complex number for every (layer, row, column).

  2. new ComplexField(rows: Int, columns: Int, f: (Int, Int) ⇒ cogmath.algebra.complex.Complex)

    Permalink

    Create a 2D field of complex numbers.

    Create a 2D field of complex numbers.

    rows

    Rows in field.

    columns

    Columns in field.

    f

    Function which returns a complex number for every (row, column).

  3. new ComplexField(columns: Int, f: (Int) ⇒ cogmath.algebra.complex.Complex)

    Permalink

    Create a 1D field of complex numbers.

    Create a 1D field of complex numbers.

    columns

    Columns in field.

    f

    Function which returns a complex number for every (column).

  4. new ComplexField(value: cogmath.algebra.complex.Complex)

    Permalink

    Create a 0D field of complex numbers.

  5. new ComplexField(opcode: Opcode, inputs: Array[Field], fieldType: platform.types.FieldType)

    Permalink
  6. new ComplexField(operation: Operation, fieldType: platform.types.FieldType)

    Permalink

    operation

    The operation that creates this field.

    fieldType

    Type of the field.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. def !===(that: Float): Field

    Permalink

    For every element, x, in this, compute x notIdenticallyEquals that where 1.0f represents a "true" result and 0.0f represents a "false" result.

    For every element, x, in this, compute x notIdenticallyEquals that where 1.0f represents a "true" result and 0.0f represents a "false" result. The resulting field has the same field shape and tensor shape as this.

    that

    Operand for !=== operator.

    returns

    A field equal to this with each element, x, mapped to x notIdenticallyEquals that.

    Definition Classes
    FieldCogOperatorAPI
  3. def !===(that: Field): Field

    Permalink

    Compare two fields using the "not identically equal" operator; a numeric value of 1.0f represents true (first operand != second operand) and a numeric value of 0.0f represents false.

    Compare two fields using the "not identically equal" operator; a numeric value of 1.0f represents true (first operand != second operand) and a numeric value of 0.0f represents false.

    This operator follows the algebraic binary operator rules for input type compatibility, implicit type conversions, and output result type. See the class description for these rules.

    that

    Operand for computing this !=== that.

    returns

    this notIdenticallyEqualTo that

    Definition Classes
    FieldCogOperatorAPI
  4. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  5. def %(that: Float): Field

    Permalink

    For every element, x, in this, compute x modulo that.

    For every element, x, in this, compute x modulo that. The result has the same field shape and tensor shape as this.

    that

    Operand for modulo operator.

    returns

    A field equal to this with each element, x, mapped to x modulo that.

    Definition Classes
    FieldCogOperatorAPI
  6. def %(that: Field): Field

    Permalink

    Compute this modulo that to create a third field.

    Compute this modulo that to create a third field.

    This operator follows the algebraic binary operator rules for input type compatibility, implicit type conversions, and output result type. See the class description for these rules.

    that

    Operand for computing this modulo that.

    returns

    this % that

    Definition Classes
    FieldCogOperatorAPI
  7. def *(that: cogmath.algebra.complex.Complex): Field

    Permalink

    Multiply every element in this by that.

    Multiply every element in this by that. This will coerce this to be complex before proceeding.

    that

    Multiplicand

    returns

    A field equal to the product of this and that, where every numeric component of this has been multiplied by that.

    Definition Classes
    FieldCogOperatorAPI
  8. def *(that: Float): Field

    Permalink

    Multiply every element in this by that to produce a result with the same field shape and tensor shape as this.

    Multiply every element in this by that to produce a result with the same field shape and tensor shape as this.

    that

    Constant to be multiplied with every number in this.

    returns

    A field equal to the product of this and that, where every numeric component of this has been multiplied by that.

    Definition Classes
    FieldCogOperatorAPI
  9. def *(that: Field): Field

    Permalink

    Multiply this field by that field to create a third field.

    Multiply this field by that field to create a third field.

    This operator follows the algebraic binary operator rules for input type compatibility, implicit type conversions, and output result type. See the class description for these rules.

    that

    Field to be multiplied by this.

    returns

    this * that

    Definition Classes
    FieldCogOperatorAPI
  10. def +(that: cogmath.algebra.complex.Complex): Field

    Permalink

    Add the constant that to every element in this.

    Add the constant that to every element in this. This will coerce this to be complex before proceeding.

    that

    Constant to be added to number in this.

    returns

    A field equal to the sum of this and that, where that has been added to every numeric component of this.

    Definition Classes
    FieldCogOperatorAPI
  11. def +(that: Float): Field

    Permalink

    Add the constant that to every element in this to produce a result with the same field shape and tensor shape as this.

    Add the constant that to every element in this to produce a result with the same field shape and tensor shape as this.

    that

    Constant to be added to every number in this.

    returns

    A field equal to the sum of this and that, where that has been added to every numeric component of this.

    Definition Classes
    FieldCogOperatorAPI
  12. def +(that: Field): Field

    Permalink

    Add this field and that field to create a third field.

    Add this field and that field to create a third field.

    This operator follows the algebraic binary operator rules for input type compatibility, implicit type conversions, and output result type. See the class description for these rules.

    that

    Field to be added to this.

    returns

    Sum of the two fields.

    Definition Classes
    FieldCogOperatorAPI
  13. def -(that: cogmath.algebra.complex.Complex): Field

    Permalink

    Subtract the constant that from every element in this.

    Subtract the constant that from every element in this. This will coerce this to be complex before proceeding.

    that

    Constant to be subtracted from each number in this.

    returns

    A field equal to the difference of this and that, where that has been subtracted from every numeric component of this.

    Definition Classes
    FieldCogOperatorAPI
  14. def -(that: Float): Field

    Permalink

    Subtract the constant that from every element in this to produce a result with the same field shape and tensor shape as this.

    Subtract the constant that from every element in this to produce a result with the same field shape and tensor shape as this.

    that

    Constant to be sutracted from every number in this.

    returns

    A field equal to the difference of this and that, where that has been subtracted from every numeric component of this.

    Definition Classes
    FieldCogOperatorAPI
  15. def -(that: Field): Field

    Permalink

    Subtract that field from this field to create a third field.

    Subtract that field from this field to create a third field.

    This operator follows the algebraic binary operator rules for input type compatibility, implicit type conversions, and output result type. See the class description for these rules.

    that

    Field to be subtracted to this.

    returns

    this - that

    Definition Classes
    FieldCogOperatorAPI
  16. def /(that: cogmath.algebra.complex.Complex): Field

    Permalink

    Divide every element in this by that.

    Divide every element in this by that. This will coerce this to be complex before proceeding.

    that

    Divisor.

    returns

    A field equal to the quotient of this and that, where every numeric component of this has been divided by that.

    Definition Classes
    FieldCogOperatorAPI
  17. def /(that: Float): Field

    Permalink

    Divide every element in this by that to produce a result with the same field shape and tensor shape as this.

    Divide every element in this by that to produce a result with the same field shape and tensor shape as this.

    The user must assure that the divisor is not zero, since the result would be NaN which does not throw an exception.

    that

    Divisor.

    returns

    A field equal to this dividedBy that, where every numeric component of this has been divided by that.

    Definition Classes
    FieldCogOperatorAPI
  18. def /(that: Field): Field

    Permalink

    Divide this field by that field to create a third field.

    Divide this field by that field to create a third field.

    This operator follows the algebraic binary operator rules for input type compatibility, implicit type conversions, and output result type. See the class description for these rules.

    that

    Field that this will be divided by.

    returns

    this / that

    Definition Classes
    FieldCogOperatorAPI
  19. def <(that: Float): Field

    Permalink

    For every element, x, in this, compute x lessThan that where 1.0f represents a "true" result and 0.0f represents a "false" result.

    For every element, x, in this, compute x lessThan that where 1.0f represents a "true" result and 0.0f represents a "false" result. The resulting field has the same field shape and tensor shape as this.

    that

    Operand for < operator.

    returns

    A field equal to this with each element, x, mapped to x lessThan that.

    Definition Classes
    FieldCogOperatorAPI
  20. def <(that: Field): Field

    Permalink

    Compare two fields using the "less than" operator; a numeric value of 1.0f represents true (first operand < second operand) and a numeric value of 0.0f represents false.

    Compare two fields using the "less than" operator; a numeric value of 1.0f represents true (first operand < second operand) and a numeric value of 0.0f represents false.

    This operator follows the algebraic binary operator rules for input type compatibility, implicit type conversions, and output result type. See the class description for these rules.

    that

    Operand for computing this < that.

    returns

    this lessThan that

    Definition Classes
    FieldCogOperatorAPI
  21. def <=(that: Float): Field

    Permalink

    For every element, x, in this, compute x lessThanEqual that where 1.0f represents a "true" result and 0.0f represents a "false" result.

    For every element, x, in this, compute x lessThanEqual that where 1.0f represents a "true" result and 0.0f represents a "false" result. The resulting field has the same field shape and tensor shape as this.

    that

    Operand for <= operator.

    returns

    A field equal to this with each element, x, mapped to x lessThanEqual that.

    Definition Classes
    FieldCogOperatorAPI
  22. def <=(that: Field): Field

    Permalink

    Compare two fields using the "less than equal" operator; a numeric value of 1.0f represents true (first operand <= second operand) and a numeric value of 0.0f represents false.

    Compare two fields using the "less than equal" operator; a numeric value of 1.0f represents true (first operand <= second operand) and a numeric value of 0.0f represents false.

    This operator follows the algebraic binary operator rules for input type compatibility, implicit type conversions, and output result type. See the class description for these rules.

    that

    Operand for computing this <- that.

    returns

    this lessThanOrEquel that

    Definition Classes
    FieldCogOperatorAPI
  23. def <==(that: Field): Unit

    Permalink

    Feedback operator, denotes a field value fed back to this.

    Feedback operator, denotes a field value fed back to this.

    This does automatic type coercion if the field fed back is larger than or equal to the size (in each dimension) of the recipient of that field. This should be overridden where illegal.

    that

    Field whose value will become this field's value on the next clock tick.

    Definition Classes
    FieldCogOperatorAPI
  24. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  25. def ===(that: Float): Field

    Permalink

    For every element, x, in this, compute x identicallyEquals that where 1.0f represents a "true" result and 0.0f represents a "false" result.

    For every element, x, in this, compute x identicallyEquals that where 1.0f represents a "true" result and 0.0f represents a "false" result. The resulting field has the same field shape and tensor shape as this.

    that

    Operand for === operator.

    returns

    A field equal to this with each element, x, mapped to x identicallyEquals that.

    Definition Classes
    FieldCogOperatorAPI
  26. def ===(that: Field): Field

    Permalink

    Compare two fields using the "identically equal" operator; a numeric value of 1.0f represents true (first operand == second operand) and a numeric value of 0.0f represents false.

    Compare two fields using the "identically equal" operator; a numeric value of 1.0f represents true (first operand == second operand) and a numeric value of 0.0f represents false.

    This operator follows the algebraic binary operator rules for input type compatibility, implicit type conversions, and output result type. See the class description for these rules.

    that

    Operand for computing this === that.

    returns

    this identicallyEqualTo that

    Definition Classes
    FieldCogOperatorAPI
  27. def >(that: Float): Field

    Permalink

    For every element, x, in this, compute x greaterThan that where 1.0f represents a "true" result and 0.0f represents a "false" result.

    For every element, x, in this, compute x greaterThan that where 1.0f represents a "true" result and 0.0f represents a "false" result. The resulting field has the same field shape and tensor shape as this.

    that

    Operand for > operator.

    returns

    A field equal to this with each element, x, mapped to x greaterThan that.

    Definition Classes
    FieldCogOperatorAPI
  28. def >(that: Field): Field

    Permalink

    Compare two fields using the "greater than" operator; a numeric value of 1.0f represents true (first operand > second operand) and a numeric value of 0.0f represents false.

    Compare two fields using the "greater than" operator; a numeric value of 1.0f represents true (first operand > second operand) and a numeric value of 0.0f represents false.

    This operator follows the algebraic binary operator rules for input type compatibility, implicit type conversions, and output result type. See the class description for these rules.

    that

    Operand for computing this > that.

    returns

    this greaterThan that

    Definition Classes
    FieldCogOperatorAPI
  29. def >=(that: Float): Field

    Permalink

    For every element, x, in this, compute x greaterThanEqual that where 1.0f represents a "true" result and 0.0f represents a "false" result.

    For every element, x, in this, compute x greaterThanEqual that where 1.0f represents a "true" result and 0.0f represents a "false" result. The resulting field has the same field shape and tensor shape as this.

    that

    Operand for >= operator.

    returns

    A field equal to this with each element, x, mapped to x greaterThanEqual that.

    Definition Classes
    FieldCogOperatorAPI
  30. def >=(that: Field): Field

    Permalink

    Compare two fields using the "greater than or equal" operator; a numeric value of 1.0f represents true (first operand >= second operand) and a numeric value of 0.0f represents false.

    Compare two fields using the "greater than or equal" operator; a numeric value of 1.0f represents true (first operand >= second operand) and a numeric value of 0.0f represents false.

    This operator follows the algebraic binary operator rules for input type compatibility, implicit type conversions, and output result type. See the class description for these rules.

    that

    Operand for computing this >= that.

    returns

    this greaterThanOrEqual that

    Definition Classes
    FieldCogOperatorAPI
  31. def ^(that: Field): Field

    Permalink

    Compute the outer product of Scalarfields this and that.

    Compute the outer product of Scalarfields this and that. The output field has a field shape that is the concatenation of the two input field shapes, and must be at most 3-dimensional. Each output element is calculated as in:

    out(in1Indices, in2Indices) = in1(in1Indices) * in2(in2Indices)

    This operation is implemented by a CPU kernel, so will be slow for big inputs.

    that

    Operand for computing this ^ that.

    returns

    A field equal to the outer product of this and that,

    Definition Classes
    FieldCogOperatorAPI
  32. def abs: Field

    Permalink

    Take the absolute value of every numeric element in this.

    Take the absolute value of every numeric element in this.

    returns

    Field equal to input field with each element, x, mapped to absoluteValue(x).

    Definition Classes
    Field
  33. def acos: Field

    Permalink

    Take the arccosine of every numeric element in this.

    Take the arccosine of every numeric element in this.

    returns

    Field equal to input field with each element, x, mapped to acos(x).

    Definition Classes
    Field
  34. def apply(f2: Field): Field

    Permalink

    Reduce the dimensionality of a field by 1 by "slicing" along one index of the first dimension.

    Reduce the dimensionality of a field by 1 by "slicing" along one index of the first dimension.

    For example, consider this input (3 rows x 4 columns) field:

    0  1  2  3
    4  5  6  7
    8  9  0  1

    The first dimension is rows, so a "slice index" of 0 would return the first row:

    0  1  2  3

    A slice index of 1 would return the second row:

    4  5  6  7

    And a slice index of 2 would return the third row:

    8  9  0  1
    f2

    A 0D scalar field supplying the index of the first dimension along which we will slice out a lower-dimensional field.

    returns

    A sliced field, of dimension one less than the input field dimension.

    Definition Classes
    Field
  35. def apply(index: Int): Field

    Permalink

    Reduce the dimensionality of a field by 1 by "slicing" along one index of the first dimension.

    Reduce the dimensionality of a field by 1 by "slicing" along one index of the first dimension.

    For example, consider this input (3 rows x 4 columns) field:

    0  1  2  3
    4  5  6  7
    8  9  0  1

    The first dimension is rows, so a "slice index" of 0 would return the first row:

    0  1  2  3

    A slice index of 1 would return the second row:

    4  5  6  7

    And a slice index of 2 would return the third row:

    8  9  0  1
    index

    The index of the first dimension along which we will slice out a lower-dimensional field.

    returns

    A sliced field, of dimension one less than the input field dimension.

    Definition Classes
    FieldCogOperatorAPI
  36. def apply(ranges: Range*): Field

    Permalink

    Extract a contiguous subfield from a field, maintaining its dimensionality.

    Extract a contiguous subfield from a field, maintaining its dimensionality.

    Each dimension of a field is indexed starting a zero. The user supplies a range of indices, one for each dimension, that specifies the continguous range of indices that should be extracted into the subfield.

    For example, consider this input field:

    0  1  2  3
    4  5  6  7
    8  9  0  1

    This has 3 rows (first dimension) and 4 columns (second dimension) so its shape is 3 x 4. Specify row range (1 to 2) and column range (1 to 3) would extract the following subfield:

    5  6  7
    9  0  1

    If the use of this subfield does not shift the origin, then use a trim instead which might be more efficient due to kernel merging.

    ranges

    For each dimension, a range of indices specifying where to extract the subfield.

    returns

    Subfield of input as specified by the range parameters.

    Definition Classes
    FieldCogOperatorAPI
  37. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  38. def asin: Field

    Permalink

    Take the arcsine of every numeric element in this.

    Take the arcsine of every numeric element in this.

    returns

    Field equal to input field with each element, x, mapped to asin(x).

    Definition Classes
    Field
  39. def atan2(f2: Field): Field

    Permalink

    Compute atan2 of two identically shaped scalar fields.

    Compute atan2 of two identically shaped scalar fields.

    returns

    A scalar field that's the atan2 of the two input fields.

    Definition Classes
    Field
  40. def backProjectFrame(filter: Field, borderPolicy: platform.types.BorderPolicy, samplingPolicy: platform.types.ConvolutionSamplingPolicy = NoSamplingConvolution, batchSize: Int = 1): Field

    Permalink

    Convolve a vector field with a vector-field filter frame.

    Convolve a vector field with a vector-field filter frame.

    filter

    The filter to use for convolution; must be square and with odd size in each dimension.

    borderPolicy

    Policy to use for handling convolution along borders, implicitly helps to determine size of output field.

    samplingPolicy

    Upsampling, downsampling optionally embedded in the convolution, also helps to determine the size of output field.

    batchSize

    The number of logical (possibly multi-plane) images present in the input field.

    returns

    Input field convolved with filter using the supplied border and sampling policies.

    Definition Classes
    Field
  41. def backwardDivergence: Field

    Permalink

    Compute the backward divergence of a 2D vector field.

    Compute the backward divergence of a 2D vector field.

    This is the adjoint operator of forwardGradient.

    returns

    A scalar field representing the backward divergence of an input vector field.

    Definition Classes
    Field
  42. def backwardGradient: Field

    Permalink

    Compute the backward gradient of a 2D scalar or vector field.

    Compute the backward gradient of a 2D scalar or vector field.

    returns

    For a scalar field input, a vector field representing the forward gradient of the input; for a vector input field, an order 4 tensor field representing the forward gradient of the input.

    Definition Classes
    Field
  43. def bilateralFilter(spatialFilter: cogmath.algebra.real.Matrix, rangeSigma: Float): Field

    Permalink

    Perform bilateral filtering using spatialFilter for spatial filtering (typically this will be a truncated Gaussian) and a Gaussian with width rangeSigma for range filtering.

    Perform bilateral filtering using spatialFilter for spatial filtering (typically this will be a truncated Gaussian) and a Gaussian with width rangeSigma for range filtering.

    Definition Classes
    Field
  44. def blockReduceMax(factor: Int): Field

    Permalink

    Reduce a vector field to a shorter (by factor factor) vector field by taking the max() of the first factor input vector elements to form the first output vector element, and so forth.

    Reduce a vector field to a shorter (by factor factor) vector field by taking the max() of the first factor input vector elements to form the first output vector element, and so forth.

    returns

    A vector field with each element equal to the max() of factor components of the corresponding vector in the input field.

    Definition Classes
    Field
  45. def blockReduceMin(factor: Int): Field

    Permalink

    Reduce a vector field to a shorter (by factor factor) vector field by taking the min() of the first factor input vector elements to form the first output vector element, and so forth.

    Reduce a vector field to a shorter (by factor factor) vector field by taking the min() of the first factor input vector elements to form the first output vector element, and so forth.

    returns

    A vector field with each element equal to the min() of factor components of the corresponding vector in the input field.

    Definition Classes
    Field
  46. def blockReduceSum(factor: Int): Field

    Permalink

    Reduce a vector field to a shorter (by factor factor) vector field by summing the first factor input vector elements to form the first output vector element, and so forth.

    Reduce a vector field to a shorter (by factor factor) vector field by summing the first factor input vector elements to form the first output vector element, and so forth.

    returns

    A vector field with each element equal to the sum of factor components of the corresponding vector in the input field.

    Definition Classes
    Field
  47. def centralGradient: Field

    Permalink

    Compute the central gradient of a scalar of vector field.

    Compute the central gradient of a scalar of vector field.

    The central gradient at the point (x, y) is computed using the values at (x - 1, y), (x, y - 1), (x, y + 1), and (x + 1, y + 1)

    returns

    For a scalar field input, returns a vectorField representing the central gradient of the input. For a vector field input, returns an order-4 tensor field representing the central gradient of the input.

    Definition Classes
    Field
  48. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. val columns: Int

    Permalink

    "Columns" in the field.

    "Columns" in the field. See class description for meaning of columns.

    Definition Classes
    FieldParameters
  50. implicit def complexToCogComplex(c: cogmath.algebra.complex.Complex): CogComplex

    Permalink

    Implicit conversion of a Complex to a CogComplex which allows for fields to be combined with floating point numbers in a simple way.

    Implicit conversion of a Complex to a CogComplex which allows for fields to be combined with floating point numbers in a simple way. This makes it possible to express commutative operations with a common syntax.

    For example

    Field + Complex

    and

    Complex + Field

    are both legal and compilable with this implicit conversion.

    c

    The Complex to be converted to a CogComplex

    returns

    The CogComplex created from c.

    Definition Classes
    ImplicitConversions
  51. implicit def complexVectorTo0DComplexVectorField(v: cogmath.algebra.complex.ComplexVector): ComplexVectorField

    Permalink

    Implicit conversion of a ComplexVector to a 0D constant ComplexVectorField which allows for fields to be combined with ComplexVectors in a simple way.

    Implicit conversion of a ComplexVector to a 0D constant ComplexVectorField which allows for fields to be combined with ComplexVectors in a simple way. This makes it possible to express commutative operations with a common syntax.

    For example

    Field + ComplexVector

    and

    ComplexVector + Field

    are both legal and compilable with this implicit conversion.

    v

    The complex vector to be converted to a 0D complex vector field.

    returns

    A 0D complex vector field initialized to v.

    Definition Classes
    ImplicitConversions
  52. def conditionNumber: Field

    Permalink

    Given a matrix field, compute the condition number for each matrix in that field.

    Given a matrix field, compute the condition number for each matrix in that field. This is currently limited to fields containing 2 x 2 matrices.

    returns

    Scalar field holding the condition numbers for the corresponding matrices in the input matrix field.

    Definition Classes
    Field
  53. def conjugate: Field

    Permalink

    Take the complex conjugate of each element in a complex field

    Take the complex conjugate of each element in a complex field

    Definition Classes
    Field
  54. def convolve(filter: Field, borderPolicy: platform.types.BorderPolicy, samplingPolicy: platform.types.ConvolutionSamplingPolicy = NoSamplingConvolution): Field

    Permalink

    Convolve a scalar/vector/matrix field with a filter.

    Convolve a scalar/vector/matrix field with a filter.

    filter

    The filter to use for convolution; must be square and with odd size in each dimension.

    borderPolicy

    Policy to use for handling convolution along borders, implicitly helps to determine size of output field.

    samplingPolicy

    Upsampling, downsampling optionally embedded in the convolution, also helps to determine the size of output field.

    returns

    Input field convolved with filter using the supplied border and sampling policies.

    Definition Classes
    Field
  55. def convolveFilterAdjoint(filter: Field, borderPolicy: platform.types.BorderPolicy, samplingPolicy: platform.types.ConvolutionSamplingPolicy = NoSamplingConvolution, batchSize: Int = 1): Field

    Permalink

    Convolve a vector field with a vector-field with "filter adjoint" plane mixing.

    Convolve a vector field with a vector-field with "filter adjoint" plane mixing.

    filter

    The filter to use for convolution; must be square and with odd size in each dimension.

    borderPolicy

    Policy to use for handling convolution along borders, implicitly helps to determine size of output field.

    samplingPolicy

    Upsampling, downsampling optionally embedded in the convolution, also helps to determine the size of output field.

    batchSize

    The number of logical (possibly multi-plane) images present in the input field.

    returns

    Input field convolved with filter using the supplied border and sampling policies.

    Definition Classes
    Field
  56. def convolveSeparable(rowFilter: Field, columnFilter: Field, borderPolicy: platform.types.BorderPolicy): Field

    Permalink

    Convolve a scalar/vector/matrix field with a row filter and a column filter (separable convolution).

    Convolve a scalar/vector/matrix field with a row filter and a column filter (separable convolution).

    rowFilter

    The filter to use for convolving the rows with odd size in each dimension.

    columnFilter

    The filter to use for convolving the columns with odd size in each dimension.

    borderPolicy

    Policy to use for handling convolution along borders, implicitly helps to determine size of output field.

    returns

    Input field convolved with filters using the supplied border policy.

    Definition Classes
    Field
  57. def cos: Field

    Permalink

    Take the cosine of every numeric element in this.

    Take the cosine of every numeric element in this.

    returns

    Field equal to input field with each element, x, mapped to cos(x).

    Definition Classes
    Field
  58. def cosh: Field

    Permalink

    Take the hyperbolic cosine of every numeric element in this.

    Take the hyperbolic cosine of every numeric element in this.

    returns

    Field equal to input field with each element, x, mapped to cosh(x).

    Definition Classes
    Field
  59. def crossCorrelate(filter: Field, borderPolicy: platform.types.BorderPolicy, samplingPolicy: platform.types.ConvolutionSamplingPolicy = NoSamplingConvolution): Field

    Permalink

    Cross-correlate a scalar/vector/matrix field with a filter.

    Cross-correlate a scalar/vector/matrix field with a filter.

    filter

    The filter to use for cross-correlation; must be square and with odd size in each dimension.

    borderPolicy

    Policy to use for handling cross-correlation along borders, implicitly helps to determine size of output field.

    samplingPolicy

    Upsampling, downsampling optionally embedded in the crossCorrelation, also helps to determine the size of output field.

    returns

    Input field cross-correlated with filter using the supplied border and sampling policies.

    Definition Classes
    Field
  60. def crossCorrelateFilterAdjoint(filter: Field, borderPolicy: platform.types.BorderPolicy, samplingPolicy: platform.types.ConvolutionSamplingPolicy = NoSamplingConvolution, batchSize: Int = 1): Field

    Permalink

    Cross-correlate a vector field with a vector-field with "filter adjoint" plane mixing.

    Cross-correlate a vector field with a vector-field with "filter adjoint" plane mixing.

    filter

    The filter to use for cross-correlation; must be square and with odd size in each dimension.

    borderPolicy

    Policy to use for handling cross-correlation along borders, implicitly helps to determine size of output field.

    samplingPolicy

    Upsampling, downsampling optionally embedded in the crossCorrelation, also helps to determine the size of output field.

    batchSize

    The number of logical (possibly multi-plane) images present in the input field.

    returns

    Input field cross-correlated with filter using the supplied border and sampling policies.

    Definition Classes
    Field
  61. def crossCorrelateSeparable(rowFilter: Field, columnFilter: Field, borderPolicy: platform.types.BorderPolicy): Field

    Permalink

    Cross-correlate a scalar/vector/matrix field with a row filter and a column filter (separable convolution).

    Cross-correlate a scalar/vector/matrix field with a row filter and a column filter (separable convolution).

    rowFilter

    The filter to use for cross-correlating the rows with odd size in each dimension.

    columnFilter

    The filter to use for cross-correlating the columns with odd size in each dimension.

    borderPolicy

    Policy to use for handling cross-correlation along borders, implicitly helps to determine size of output field.

    returns

    Input field cross-correlated with filters using the supplied border policy.

    Definition Classes
    Field
  62. def crossDot(f2: Field): Field

    Permalink

    Multiply a 2D matrix field, this, by a 2D scalar field, f2, to produce a 2D scalar field.

    Multiply a 2D matrix field, this, by a 2D scalar field, f2, to produce a 2D scalar field.

    The scalar field f2 must have the same shape as the matrices in this. This operator is basically pretending that the f2 scalar field is really a matrix and simply dotting that matrix with every matrix in the matrix field this, producing a scalar in the corresponding position of the result scalar field.

    f2

    Scalar field to multiply with this.

    returns

    "cross dot" product of this and f2.

    Definition Classes
    Field
  63. def dct: Field

    Permalink

    Takes the DCT (discrete cosine transform) of a 2D field, producing a field with the same shape as the input.

    Takes the DCT (discrete cosine transform) of a 2D field, producing a field with the same shape as the input.

    The following sequence will return the original input, within the bounds of computational error:

    val field
    val transformed = field.dct
    val restored = transformed.dctInverse
    // restored is approximately equal to field

    For a somewhat faster version, see dctTransposed.

    The DCT has several requirements:

    The number of rows and columns must each be a power of 2.

    Rows and columns are restricted to the range [256, 2048]

    returns

    The DCT of the input.

    Definition Classes
    Field
  64. def dctInverse: Field

    Permalink

    Takes the inverse DCT (discrete cosine transform) of a 2D field, producing a field with the same shape as the input.

    Takes the inverse DCT (discrete cosine transform) of a 2D field, producing a field with the same shape as the input.

    The following sequence will return the original input, within the bounds of computational error:

    val field
    val transformed = field.dct
    val restored = transformed.dctInverse
    // restored is approximately equal to field

    For a somewhat faster version, see dctInverseTransposed.

    The DCT has several requirements:

    The number of rows and columns must each be a power of 2.

    Rows and columns are restricted to the range [256, 2048]

    returns

    The DCT of the input.

    Definition Classes
    Field
  65. def dctInverseTransposed: Field

    Permalink

    Takes the inverse DCT (discrete cosine transform) of a 2D field, producing a field with the same shape as the input.

    Takes the inverse DCT (discrete cosine transform) of a 2D field, producing a field with the same shape as the input.

    The following sequence will return the original input, within the bounds of computational error:

    val field
    val transformed = field.dctTransposed
    val restored = transformed.dctInverseTransposed
    // restored is approximately equal to field

    This is a somewhat faster version of dctInverse where the transpose is not important to (or can be compensated within) an application.

    The DCT has several requirements:

    The number of rows and columns must each be a power of 2.

    Rows and columns are restricted to the range [256, 2048]

    returns

    The DCT of the input.

    Definition Classes
    Field
  66. def dctTransposed: Field

    Permalink

    Takes the DCT (discrete cosine transform) of a 2D field and transposes it, producing a field with the same shape as the input transposed.

    Takes the DCT (discrete cosine transform) of a 2D field and transposes it, producing a field with the same shape as the input transposed.

    The following sequence will return the original input, within the bounds of computational error:

    val field
    val transformed = field.dctTransposed
    val restored = transformed.dctInverseTransposed
    // restored is approximately equal to field

    This is a somewhat faster version of dct where the transpose is not important to (or can be compensated within) an application.

    The DCT has several requirements:

    The number of rows and columns must each be a power of 2.

    Rows and columns are restricted to the range [256, 2048]

    returns

    The DCT of the input.

    Definition Classes
    Field
  67. def determinant: Field

    Permalink

    Compute the determinant of every matrix in a matrix field.

    Compute the determinant of every matrix in a matrix field.

    returns

    Scalar field holding the determinants for the corresponding matrices in the input matrix field.

    Definition Classes
    Field
  68. val dimensions: Int

    Permalink

    Dimensions of the field.

    Dimensions of the field.

    Definition Classes
    FieldParameters
  69. def domainFilterColumns(domainTransform: ScalarField, boxFilterRadius: Float): Field

    Permalink

    Perform a "domain filter" on the columns of a color field as a step in edge-aware normalized convolution.

    Perform a "domain filter" on the columns of a color field as a step in edge-aware normalized convolution. This "correlates" an adaptive box filter with each pixel in the columns of the color field, guided by domainTransform.

    This operation works only on color fields and is an optimization. The following code sequences, A and B, are functionally identical:

    // Prepare for filtering
    val rowTransform = colorImage.domainTransformRows(...)
    val colTransform = colorImage.transpose.domainTransformRows(...)
    
    // Sequence A (slower)
    var smooth = colorImage
    smooth = smooth.domainFilterRows(rowTransform, ...)
    smooth = smooth.transpose.domainFilterRows(colTransform, ...).transpose
    
    // Sequence B, using this operation (faster, no transposes)
    var smooth = colorImage
    smooth = smooth.domainFilterRows(rowTransform, ...)
    smooth = smooth.domainFilterColumns(colTransform, ...)

    For details, see the paper "Domain transform for edge-aware image and video processing," Gastal and Oliveira, 2011. Normally this is not useful for end-users, but you're welcome to try it if you would like to write your own edge-aware filters.

    domainTransform

    The cumulative domain transform for the image.

    boxFilterRadius

    Radius of box filter.

    returns

    The domain transform of the columns (equation 11) in the Gastal paper as a scalar field.

    Definition Classes
    Field
  70. def domainFilterRows(domainTransform: Field, boxFilterRadius: Float): Field

    Permalink

    Perform a "domain filter" on the rows of a tensor or color field as a step in edge-aware normalized convolution.

    Perform a "domain filter" on the rows of a tensor or color field as a step in edge-aware normalized convolution. This "correlates" an adaptive box filter with each pixel in the rows of the color field, guided by domainTransform.

    For details, see the paper "Domain transform for edge-aware image and video processing," Gastal and Oliveira, 2011. Normally this is not useful for end-users, but you're welcome to try it if you would like to write your own edge-aware filters.

    domainTransform

    The cumulative domain transform for the image.

    boxFilterRadius

    Radius of box filter.

    returns

    The domain transform of the rows (equation 11) in the Gastal paper as a scalar field.

    Definition Classes
    Field
  71. def domainTransformRows(spaceSigma: Float, rangeSigma: Float): Field

    Permalink

    Perform a "domain transform" on the rows of a color field or tensor field as a step in edge-aware normalized convolution.

    Perform a "domain transform" on the rows of a color field or tensor field as a step in edge-aware normalized convolution.

    For details, see the paper "Domain transform for edge-aware image and video processing," Gastal and Oliveira, 2011. Normally this is not useful for end-users, but you're welcome to try it if you would like to write your own edge-aware filters.

    spaceSigma

    Width of filter in space.

    rangeSigma

    Width of filter in range.

    returns

    The domain transform of the rows (equation 11) in the Gastal paper as a scalar field.

    Definition Classes
    Field
  72. def dot(f2: Field): Field

    Permalink

    Takes the inner product of two identically shaped tensor fields to create a scalar field.

    Takes the inner product of two identically shaped tensor fields to create a scalar field.

    The tensors in both fields must have the same shape. Dotting two tensors involves multiplying corresponding elements in the two tensors and summing the products.

    f2

    Other field to "dot" with this field.

    returns

    Scalar field where each scalar element is computed from the dot product of the tensors in the corresponding location of the two input tensor fields.

    Definition Classes
    Field
  73. def downsample(factor: Int = 2, phase: Int = 0): Field

    Permalink

    Downsample a field by taking every nth element.

    Downsample a field by taking every nth element.

    Example: for input field {1,2,3,4}

    input.downsample(2) yields {1,3}

    input.downsample(2,1) yields {2,4}

    factor

    The sampling factor, defaults to 2.

    phase

    The offset within the downsampled region from which to take data, defaults to an offset of 0.

    Definition Classes
    Field
  74. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  75. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  76. def exp: Field

    Permalink

    Apply the exponential function to every numeric element in this.

    Apply the exponential function to every numeric element in this. This works for complex and real fields.

    returns

    Field equal to input field with each element, x, mapped to exp(x).

    Definition Classes
    Field
  77. def expand(borderPolicy: platform.types.BorderPolicy, sizes: Int*): Field

    Permalink

    Expand an N-dimensional field by padding it with values per the border policy, maintaining the origin.

    Expand an N-dimensional field by padding it with values per the border policy, maintaining the origin. The supported border policies are BorderZero, BorderClamp and BorderCyclic.

    See expand(borderPolicy, shape) for a description of the border policies.

    borderPolicy

    Policy to use for producing border values.

    sizes

    The integer dimensions of the expanded output field.

    returns

    Expanded field with new elements filled in from the nearest input edge per borderPolicy.

    Definition Classes
    Field
  78. def expand(borderPolicy: platform.types.BorderPolicy, shape: cogmath.geometry.Shape): Field

    Permalink

    Expand an N-dimensional field by padding it with values per the border policy, maintaining the origin.

    Expand an N-dimensional field by padding it with values per the border policy, maintaining the origin. The supported border policies are BorderZero, BorderClamp and BorderCyclic.

    With the BorderZero policy, the border values are all 0.

    Border Zero Example. A 3 x 4 input field:

    1  2  3  4
    5 -1 -1  6
    7  8  9  0

    If we expand this to 7 x 8, we fill the new elements with zeroes:

    1  2  3  4  0  0  0  0
    5 -1 -1  6  0  0  0  0
    7  8  9  0  0  0  0  0
    0  0  0  0  0  0  0  0
    0  0  0  0  0  0  0  0
    0  0  0  0  0  0  0  0
    0  0  0  0  0  0  0  0

    With the BorderClamp policy, the border is extended outwards into the expanded output field, wrapping around as though the output field were a torus. This is useful when doing convolution with the FFT and one wishes to minimize border effects by "border clamping".

    BorderClamp Example. A 3 x 4 input field:

    1  2  3  4
    5 -1 -1  6
    7  8  9  0

    If we expand this to 7 x 8, we extend the borders, wrapping around as though the output field were a torus:

    1  2  3  4  4  4  1  1
    5 -1 -1  6  6  6  5  5
    7  8  9  0  0  0  7  7
    7  8  9  0  0  0  0  0
    7  8  9  0  0  0  0  0
    1  2  3  4  0  0  0  0
    1  2  3  4  0  0  0  0

    With the BorderCyclic policy, the border values emulate a cyclic "wrap-around" in the original field, as though the input field were a torus. This is useful when doing cyclic convolution with the FFT and one wishes expand the field to make it a power of 2 (necessary for the FFT) while still preserving cyclic convolution

    BorderCyclic Example. A 3 x 4 input field:

    1  2  3  4
    5 -1 -1  6
    7  8  9  0

    If we expand this to 7 x 8, we extend the borders, wrapping around as though the input field were a torus:

    1  2  3  4  1  2  3  4
    5 -1 -1  6  5 -1 -1  6
    7  8  9  0  7  8  9  0
    1  2  3  4  1  2  3  4
    5 -1 -1  6  5 -1 -1  6
    5 -1 -1  6  5 -1 -1  6
    7  8  9  0  7  8  9  0
    borderPolicy

    Policy to use for producing border values.

    shape

    The shape of the expanded output field.

    returns

    Expanded field with new elements filled in from the nearest input edge per borderPolicy.

    Definition Classes
    Field
  79. def fft: Field

    Permalink

    Compute the FFT of a complex field.

    Compute the FFT of a complex field.

    Definition Classes
    Field
  80. def fftColumns: Field

    Permalink

    Compute the FFT of the columns only in a 2D complex field.

    Compute the FFT of the columns only in a 2D complex field.

    Definition Classes
    Field
  81. def fftInverse: Field

    Permalink

    Compute the inverse FFT of a complex field (includes scaling).

    Compute the inverse FFT of a complex field (includes scaling).

    Definition Classes
    Field
  82. def fftInverseColumns: Field

    Permalink

    Compute the inverseFFT of the columns only in a 2D complex field.

    Compute the inverseFFT of the columns only in a 2D complex field.

    Definition Classes
    Field
  83. def fftInverseRows: Field

    Permalink

    Compute the inverse FFT of the rows only in a 2D complex field.

    Compute the inverse FFT of the rows only in a 2D complex field.

    Definition Classes
    Field
  84. def fftRows: Field

    Permalink

    Compute the FFT of the rows only in a 2D complex field.

    Compute the FFT of the rows only in a 2D complex field.

    Definition Classes
    Field
  85. implicit def fieldArrayToMatrixFieldArray(a: Array[Field]): Array[MatrixField]

    Permalink

    Implicit conversion of an array of Fields to an array of ScalarFields.

    Implicit conversion of an array of Fields to an array of ScalarFields.

    a

    An array of Fields.

    returns

    An array of MatrixFields.

    Definition Classes
    ImplicitConversions
  86. implicit def fieldArrayToScalarFieldArray(a: Array[Field]): Array[ScalarField]

    Permalink

    Implicit conversion of an array of Fields to an array of ScalarFields.

    Implicit conversion of an array of Fields to an array of ScalarFields.

    a

    An array of Fields.

    returns

    An array of ScalarFields.

    Definition Classes
    ImplicitConversions
  87. implicit def fieldArrayToVectorFieldArray(a: Array[Field]): Array[VectorField]

    Permalink

    Implicit conversion of an array of Fields to an array of ScalarFields.

    Implicit conversion of an array of Fields to an array of ScalarFields.

    a

    An array of Fields.

    returns

    An array of VectorFields.

    Definition Classes
    ImplicitConversions
  88. def fieldReduceMax: Field

    Permalink

    Reduce a scalar field to a 0D scalar containing a single element which is the maximum element in the input field.

    Reduce a scalar field to a 0D scalar containing a single element which is the maximum element in the input field.

    returns

    0D scalar field holding the max value in input field.

    Definition Classes
    Field
  89. def fieldReduceMedian: Field

    Permalink

    Find the median value in a scalar field.

    Find the median value in a scalar field.

    returns

    0D scalar field holding the median value of the input field.

    Definition Classes
    Field
  90. def fieldReduceMin: Field

    Permalink

    Reduce a scalar field to a 0D scalar containing a single element which is the minimum element in the input field.

    Reduce a scalar field to a 0D scalar containing a single element which is the minimum element in the input field.

    returns

    0D scalar field holding the min value in input field.

    Definition Classes
    Field
  91. def fieldReduceSum: Field

    Permalink

    Reduce a scalar field to a 0D scalar containing the sum of all the elements in the input field.

    Reduce a scalar field to a 0D scalar containing the sum of all the elements in the input field.

    returns

    0D scalar field holding the sum of values in input field.

    Definition Classes
    Field
  92. val fieldShape: cogmath.geometry.Shape

    Permalink

    Shape of the field.

    Shape of the field.

    Definition Classes
    FieldParameters
  93. implicit def fieldToColorField(f: Field): ColorField

    Permalink

    Implicit conversion of a Field to a ColorField.

    Implicit conversion of a Field to a ColorField. Field is abstract, so this method will perform the appropriate type coercion if the field is already a ColorField but stored in a Field variable. This method also supports converting a ScalarField or VectorField to a ColorField.

    f

    A field which needs coercion to the ColorField type.

    returns

    The converted field.

    Definition Classes
    ImplicitConversions
  94. implicit def fieldToComplexField(f: Field): ComplexField

    Permalink

    Implicit conversion of a Field to a ComplexField.

    Implicit conversion of a Field to a ComplexField. Field is abstract, so this method will perform the appropriate type coercion if the field is already a ComplexField but stored in a Field variable. This method also supports converting a ScalarField to a ComplexField.

    f

    A field which needs coercion to the ComplexField type.

    returns

    The converted field.

    Definition Classes
    ImplicitConversions
  95. implicit def fieldToComplexVectorField(f: Field): ComplexVectorField

    Permalink

    Implicit conversion of a Field to a ComplexField.

    Implicit conversion of a Field to a ComplexField. Field is abstract, so this method will perform the appropriate type coercion if the field is already a ComplexField but stored in a Field variable. This method also supports converting a ScalarField to a ComplexField.

    f

    A field which needs coercion to the ComplexVectorField type.

    returns

    The converted field.

    Definition Classes
    ImplicitConversions
  96. implicit def fieldToMatrixField(f: Field): MatrixField

    Permalink

    Implicit conversion of a Field to a MatrixField.

    Implicit conversion of a Field to a MatrixField. Since Field is abstract, the only possible conversion is if the field is already a MatrixField but is stored in a Field variable. This merely does the necessary type coercion.

    f

    A field which needs coercion to the MatrixField type.

    returns

    The converted field.

    Definition Classes
    ImplicitConversions
  97. implicit def fieldToScalarField(f: Field): ScalarField

    Permalink

    Implicit conversion of a Field to a ScalarField.

    Implicit conversion of a Field to a ScalarField. Since Field is abstract, the only possible conversion is if the field is already a ScalarField but is stored in a Field variable. This merely does the necessary type coercion.

    f

    A field which needs coercion to the ScalarField type.

    returns

    The converted field.

    Definition Classes
    ImplicitConversions
  98. implicit def fieldToVectorField(f: Field): VectorField

    Permalink

    Implicit conversion of a Field to a VectorField.

    Implicit conversion of a Field to a VectorField. Field is abstract, so this method will perform the appropriate type coercion if the field is already a VectorField but stored in a Field variable. This method also supports converting a ColorField to a VectorField.

    f

    A field which needs coercion to the VectorField type.

    returns

    The converted field.

    Definition Classes
    ImplicitConversions
  99. val fieldType: platform.types.FieldType

    Permalink

    The field type of the result.

    The field type of the result.

    Definition Classes
    Field → FieldParameters → RecurrenceTrait
  100. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  101. def flip: Field

    Permalink

    Flip a field along every dimension.

    Flip a field along every dimension.

    Example. This 2D scalar field:

    1  2  3
    4  5  6
    7  8  9

    looks like this when flipped:

    9  8  7
    6  5  4
    3  2  1
    returns

    A flipped version of the input field.

    Definition Classes
    Field
  102. implicit def floatToCogFloat(f: Float): CogFloat

    Permalink

    Implicit conversion of a Float to a CogFloat which allows for fields to be combined with floating point numbers in a simple way.

    Implicit conversion of a Float to a CogFloat which allows for fields to be combined with floating point numbers in a simple way. This makes it possible to express commutative operations with a common syntax.

    For example

    Field + Float

    and

    Float + Field

    are both legal and compilable with this implicit conversion.

    f

    The Float to be converted to a CogFloat

    returns

    The CogFloat created from f.

    Definition Classes
    ImplicitConversions
  103. def floor: Field

    Permalink

    Map each numeric element of the input field to the largest integer which is less than or equal to that element.

    Map each numeric element of the input field to the largest integer which is less than or equal to that element.

    returns

    Field where every number element has been "floored" to an integer.

    Definition Classes
    Field
  104. def forwardGradient: Field

    Permalink

    Compute the forward gradient of a 2D scalar or vector field.

    Compute the forward gradient of a 2D scalar or vector field.

    This is the adjoint operator of backwardDivergence.

    returns

    For a scalar field input, a vector field representing the forward gradient of the input; for a vector input field, an order 4 tensor field representing the forward gradient of the input.

    Definition Classes
    Field
  105. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  106. def hasRecurrence: Boolean

    Permalink
    Definition Classes
    RecurrenceTrait
  107. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  108. def imaginaryPart: Field

    Permalink

    Extract the imaginary part of a complex field as a scalar field.

    Extract the imaginary part of a complex field as a scalar field.

    returns

    A scalar field with the same shape as the input, with each element equal to the imaginary part of the corresponding complex element in the input.

    Definition Classes
    Field
  109. def inputs: Seq[Field]

    Permalink

    The input fields that drive the operation that produces this field

    The input fields that drive the operation that produces this field

    Definition Classes
    Field
  110. def internalError(message: String): Unit

    Permalink

    Declare an internal error described by message.

    Declare an internal error described by message.

    Definition Classes
    CompilerError
  111. def invertMatrices: Field

    Permalink

    Invert all matrices in a matrix field using Gauss-Jordan elimination.

    Invert all matrices in a matrix field using Gauss-Jordan elimination.

    This is numerically stable only for small matrices, and let's not even get in to singular matrices. Be careful.

    returns

    A matrix field where each matrix is the (approximate) inverse of the corresponding matrix in the input matrix field.

    Definition Classes
    Field
  112. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  113. def isInstantiated: Boolean

    Permalink

    Check if this has been instantiated with a virtual field register.

    Check if this has been instantiated with a virtual field register.

    Attributes
    protected
    Definition Classes
    Field
  114. val layers: Int

    Permalink

    "Layers" in the field.

    "Layers" in the field. See class description for meaning of layers.

    Definition Classes
    FieldParameters
  115. def localMax(neighborhood: cogmath.algebra.real.Matrix): Field

    Permalink

    Find the local maximum of a neighborhood centered on each pixel in a 2D scalar field.

    Find the local maximum of a neighborhood centered on each pixel in a 2D scalar field.

    For each point in the input 2D scalar field, this searches a small neighborhood of that point and extracts the largest scalar found.

    The neighborhood is defined by a matrix which is centered on the point. A non-zero value in the kernel means the corresponding point in the field is part of the neighborhood, while a zero implies the point should be ignored.

    For example, the kernel

    1 1 0
    1 1 0
    0 0 0

    specifies the 2 x 2 neighborhood for the maximum value search.

    neighborhood

    An odd-sized matrix describing the neighborhood for doing the local max search. TO DO: This will become a field rather than a matrix. XXX

    returns

    A scalar field with the same shape as the input, where each element is equal to the local max of the input field as defined by neighborhood.

    Definition Classes
    Field
  116. def localMaxPosition(neighborhood: cogmath.algebra.real.Matrix): Field

    Permalink

    For a scalar field, find the relative position of the local maximum of a neighborhood centered on the current pixel.

    For a scalar field, find the relative position of the local maximum of a neighborhood centered on the current pixel. This is returned as vector field, with each vector's tail at the current pixel and the head pointing at the pixel containing the neighborhood's local maximum.

    The neighborhood is defined by a matrix which is centered on the point. A non-zero value in the kernel means the corresponding point in the field is part of the neighborhood, while a zero implies the point should be ignored.

    For example, the kernel

    1 1 0
    1 1 0
    0 0 0

    specifies the 2 x 2 neighborhood for the maximum value search.

    neighborhood

    An odd-sized matrix describing the neighborhood for doing the local max search. TO DO: This will become a field rather than a matrix. XXX

    returns

    A vector field with the same field shape as the input scalar field, with each vector pointing to the maximum value in the neighborhood relative to the center of the neighborhood.

    Definition Classes
    Field
  117. def localMin(neighborhood: cogmath.algebra.real.Matrix): Field

    Permalink

    Find the local minimum of a neighborhood centered on each pixel in a 2D scalar field.

    Find the local minimum of a neighborhood centered on each pixel in a 2D scalar field.

    For each point in the input 2D scalar field, this searches a small neighborhood of that point and extracts the smallest scalar found.

    The neighborhood is defined by a matrix which is centered on the point. A non-zero value in the kernel means the corresponding point in the field is part of the neighborhood, while a zero implies the point should be ignored.

    For example, the kernel

    1 1 0
    1 1 0
    0 0 0

    specifies the 2 x 2 neighborhood for the minimum value search.

    neighborhood

    An odd-sized matrix describing the neighborhood for doing the local max search. TO DO: This will become a field rather than a matrix. XXX

    returns

    A scalar field with the same shape as the input, where each element is equal to the local min of the input field as defined by neighborhood.

    Definition Classes
    Field
  118. def localMinPosition(neighborhood: cogmath.algebra.real.Matrix): Field

    Permalink

    For a scalar field, find the relative position of the local minimum of a neighborhood centered on the current pixel.

    For a scalar field, find the relative position of the local minimum of a neighborhood centered on the current pixel. This is returned as vector field, with each vector's tail at the current pixel and the head pointing at the pixel containing the neighborhood's local manimum.

    The neighborhood is defined by a matrix which is centered on the point. A non-zero value in the kernel means the corresponding point in the field is part of the neighborhood, while a zero implies the point should be ignored.

    For example, the kernel

    1 1 0
    1 1 0
    0 0 0

    specifies the 2 x 2 neighborhood for the minimum value search.

    neighborhood

    An odd-sized matrix describing the neighborhood for doing the local min search. TO DO: This will become a field rather than a matrix. XXX

    returns

    A vector field with the same field shape as the input scalar field, with each vector pointing to the minimum value in the neighborhood relative to the center of the neighborhood.

    Definition Classes
    Field
  119. def log: Field

    Permalink

    Apply the natural logarithm to every numeric element in this.

    Apply the natural logarithm to every numeric element in this.

    returns

    Field equal to input field with each element, x, mapped to log(x).

    Definition Classes
    Field
  120. def magnitude: Field

    Permalink

    Take the magnitude of each element in a complex field

    Take the magnitude of each element in a complex field

    Definition Classes
    Field
  121. def matrixRow(index: Int): Field

    Permalink

    Convert a matrix field to a vector field by stripping out one row from each matrix in the field and making it a vector.

    Convert a matrix field to a vector field by stripping out one row from each matrix in the field and making it a vector.

    index

    The index of the desired row to strip out of each matrix and use as a vector.

    returns

    A vector field made up of the stripped out vectors from the input matrix field.

    Definition Classes
    Field
  122. def max(f2: Field): Field

    Permalink

    Select the maximum value of corresponding elements in two scalar fields.

    Select the maximum value of corresponding elements in two scalar fields.

    f2

    Second scalar field to compare with this.

    returns

    Scalar field where each element is the largest corresponding elements in this or f2.

    Definition Classes
    Field
  123. def max(value: Float): Field

    Permalink

    For every element, x, in this, compute max(x, that) where 1.0f represents a "true" result and 0.0f represents a "false" result.

    For every element, x, in this, compute max(x, that) where 1.0f represents a "true" result and 0.0f represents a "false" result. The resulting field has the same field shape and tensor shape as this.

    value

    Operand for max operator.

    returns

    A field equal to this with each element, x, mapped to max(x, that).

    Definition Classes
    Field
  124. def maxPosition: Field

    Permalink

    Find the location/position of the maximum element in a scalar field.

    Find the location/position of the maximum element in a scalar field.

    returns

    A 0D vector field containing a vector holding the indices of the maximum element.

    Definition Classes
    Field
  125. def medianFilter: Field

    Permalink

    Filter a 2D input scalar field with a 3 x 3 median filter.

    Filter a 2D input scalar field with a 3 x 3 median filter.

    returns

    A 2D scalar field with the same field shape as the input, with each element median filtered.

    Definition Classes
    Field
  126. def min(f2: Field): Field

    Permalink

    Select the minimum value of corresponding elements in two scalar fields.

    Select the minimum value of corresponding elements in two scalar fields.

    f2

    Second scalar field to compare with this.

    returns

    Scalar field where each element is the smallest corresponding elements in this or f2.

    Definition Classes
    Field
  127. def min(value: Float): Field

    Permalink

    For every element, x, in this, compute min(x, that) where 1.0f represents a "true" result and 0.0f represents a "false" result.

    For every element, x, in this, compute min(x, that) where 1.0f represents a "true" result and 0.0f represents a "false" result. The resulting field has the same field shape and tensor shape as this.

    value

    Operand for min operator.

    returns

    A field equal to this with each element, x, mapped to min(x, that).

    Definition Classes
    Field
  128. def name: String

    Permalink

    Get the "full" name of a field, as a Scala-like path name.

    Get the "full" name of a field, as a Scala-like path name.

    Definition Classes
    FieldName
  129. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  130. def nonMaximumSuppression: Field

    Permalink

    Forces locally non-maximum pixels to zero for both scalar fields and vector fields.

    Forces locally non-maximum pixels to zero for both scalar fields and vector fields.

    Locality is defined to be the 8 nearest neighbors to a given pixel. If a pixel is greater than or equal to any of those neighbors, its value is left intact on the output, otherwise it's set to zero. Note that border pixels have only 5 nearest neighbors and corner pixels have only 3 nearest neighbors, so those are the only ones checked.

    Vector fields are treated as though they were an array of scalar fields, so non-maximum suppression is executed independently on each.

    returns

    A copy of the input field with locally non-maximum values set to zero.

    Definition Classes
    Field
  131. def normalizeL1: Field

    Permalink

    Normalize a scalar field using the L1 norm.

    Normalize a scalar field using the L1 norm.

    returns

    A normalized copy of the input field.

    Definition Classes
    Field
  132. def normalizeL2: Field

    Permalink

    Normalize a scalar field using the L2 norm.

    Normalize a scalar field using the L2 norm.

    returns

    A normalized copy of the input field.

    Definition Classes
    Field
  133. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  134. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  135. val opcode: Opcode

    Permalink

    The opcode of the operation that produces this field

    The opcode of the operation that produces this field

    Definition Classes
    Field → RecurrenceTrait
  136. val operation: Operation

    Permalink

    The operation that creates this field.

    The operation that creates this field.

    Definition Classes
    Field
  137. def orientedNonMaximumSuppression(orientation: Field): Field

    Permalink

    Forces locally non-maximum pixels to zero for calar fields, but only when comparing the pixels on either side of a given pixel, using orientation to define where to look for the two pixels for comparison.

    Forces locally non-maximum pixels to zero for calar fields, but only when comparing the pixels on either side of a given pixel, using orientation to define where to look for the two pixels for comparison.

    orientation

    A scalar field holding the local orientation of the input field at every point. Orientation ranges from -Pi/2 to Pi/2, where the corresponding orientation rotates clockwise from horizontal (-Pi/2) to vertical (0) to horizontal (Pi/2).

    returns

    A copy of the input field with locally non-maximum values set to zero.

    Definition Classes
    Field
  138. def phase: Field

    Permalink

    Take the phase of each element in a complex field.

    Take the phase of each element in a complex field.

    This is also commonly called arg. This is a number in the range (-Pi, Pi]

    Definition Classes
    Field
  139. def pow(that: Float): Field

    Permalink

    Raise each number in a field to the power that.

    Raise each number in a field to the power that. The resulting field has the same field shape and tensor shape as this.

    returns

    Input field with every number raised to the power that.

    Definition Classes
    Field
  140. def pow(that: Int): Field

    Permalink

    Raise each number in a field to the power that.

    Raise each number in a field to the power that. The resulting field has the same field shape and tensor shape as this.

    returns

    Input field with every number raised to the power that.

    Definition Classes
    Field
  141. def printKernelCode(): Unit

    Permalink

    Print out, if possible, GPU code that generates this field.

    Print out, if possible, GPU code that generates this field.

    Definition Classes
    Field
  142. def probe(userName: String = null): Field

    Permalink

    User mechanism for marking a field as "probed," optionally supplying a name for the field.

    User mechanism for marking a field as "probed," optionally supplying a name for the field.

    If a field is visible to reflection, it will be automatically named. In that case supplying a userName is unnecessary and not recommended.

    userName

    User's name for the field. If not supplied, the field is probed but uses system-inferred naming for the field.

    returns

    The field being probed.

    Definition Classes
    Field
  143. def projectFrame(filter: Field, borderPolicy: platform.types.BorderPolicy, samplingPolicy: platform.types.ConvolutionSamplingPolicy = NoSamplingConvolution, batchSize: Int = 1): Field

    Permalink

    Cross-correlate a vector field with a vector-field filter frame.

    Cross-correlate a vector field with a vector-field filter frame.

    filter

    The filter to use for cross-correlation; must be square and with odd size in each dimension.

    borderPolicy

    Policy to use for handling cross-correlation along borders, implicitly helps to determine size of output field.

    samplingPolicy

    Upsampling, downsampling optionally embedded in the crossCorrelation, also helps to determine the size of output field.

    batchSize

    The number of logical (possibly multi-plane) images present in the input field.

    returns

    Input field cross-correlated with filter using the supplied border and sampling policies.

    Definition Classes
    Field
  144. def random(bits: Int): Field

    Permalink

    Compute a random field based on this input field using cellular automaton based RNG.

    Compute a random field based on this input field using cellular automaton based RNG. The output ranges from [0 to 1] (inclusive) and is uniformly distributed.

    bits

    The number of bits of precision to use

    returns

    A Vector field where each point in the field is random

    Definition Classes
    Field
  145. def realPart: Field

    Permalink

    Extract the real part of a complex field as a scalar field.

    Extract the real part of a complex field as a scalar field.

    returns

    A scalar field with the same shape as the input, with each element equal to the real part of the corresponding complex element in the input.

    Definition Classes
    Field
  146. def reciprocal: Field

    Permalink

    Perform 1/x operation on every numeric element of a field.

    Perform 1/x operation on every numeric element of a field.

    Somewhat dangerous to use if any element in the field could be zero, since the resulting element would be NaN which does not throw an exception.

    returns

    Input field with each numeric element, x, mapped to 1/x.

    Definition Classes
    Field
  147. def recurrence: Option[Field]

    Permalink

    Read the current recurrence input, if any.

    Read the current recurrence input, if any.

    Definition Classes
    RecurrenceTrait
  148. def recurrence_=(that: Field): Unit

    Permalink

    Write the recurrent input, making sure it's legal.

    Write the recurrent input, making sure it's legal.

    Definition Classes
    RecurrenceTrait
  149. def reduceMax: Field

    Permalink

    Reduce a vector field to a scalar field by mapping each vector to the maximum of its components.

    Reduce a vector field to a scalar field by mapping each vector to the maximum of its components.

    returns

    A scalar field with each element equal to the maximum of the components of the corresponding vector in the input field.

    Definition Classes
    Field
  150. def reduceMin: Field

    Permalink

    Reduce a vector field to a scalar field by mapping each vector to the minimum of its components.

    Reduce a vector field to a scalar field by mapping each vector to the minimum of its components.

    returns

    A scalar field with each element equal to the minimum of the components of the corresponding vector in the input field.

    Definition Classes
    Field
  151. def reduceSum: Field

    Permalink

    Reduce a vector field to a scalar field by mapping each vector to the sum of its components.

    Reduce a vector field to a scalar field by mapping each vector to the sum of its components.

    returns

    A scalar field with each element equal to the sum of components of the corresponding vector in the input field.

    Definition Classes
    Field
  152. def replicate(shape: cogmath.geometry.Shape): Field

    Permalink

    Replicate a scalar field as matrices in a matrix field (each matrix in the matrix field is identical to the input scalar field).

    Replicate a scalar field as matrices in a matrix field (each matrix in the matrix field is identical to the input scalar field).

    shape

    The shape of the resulting output field.

    returns

    A matrix field with the same field shape as f2 and tensor shape the same as the input scalar field.

    Definition Classes
    Field
  153. def reshape(fieldShape: cogmath.geometry.Shape, tensorShape: cogmath.geometry.Shape, checkLegacyReshape: Boolean = Cog.checkLegacyReshape): Field

    Permalink

    Change the shape of a scalar field without changing the number of elements in it.

    Change the shape of a scalar field without changing the number of elements in it.

    This depends on the row-major ordering we use for elements in a field. Elements in any scalar field, regardless of dimension, have that linear ordering. Reshaping preserves that ordering; it really does nothing more than change the sizes of each dimension of the field.

    fieldShape

    the output field shape to use

    tensorShape

    the output tensor shape to use

    checkLegacyReshape

    Warn of uses of reshape that had different behaviors prior to libcog 4.3

    returns

    The input field, reshaped, with the same elements in the same linear order.

    Definition Classes
    Field
  154. def reshape(size: Int*): Field

    Permalink

    Change the shape of a scalar field without changing the number of elements in it.

    Change the shape of a scalar field without changing the number of elements in it.

    This depends on the row-major ordering we use for elements in a field. Elements in any scalar field, regardless of dimension, have that linear ordering. Reshaping preserves that ordering; it really does nothing more than change the sizes of each dimension of the field.

    size

    A sequence of new sizes for each dimensions. The product of this sequence must equal the number of elements in the input field.

    returns

    The input field, reshaped, with the same elements in the same linear order.

    Definition Classes
    Field
  155. def reverseCrossDot(f2: Field): Field

    Permalink

    Multiply a matrix field, this, by a scalar field, f2, to produce a scalar field.

    Multiply a matrix field, this, by a scalar field, f2, to produce a scalar field.

    The matrix field and scalar field operands must have identical field shapes. Each scalar element of the scalar field is multiplied by the corresponding element in the matrix field. These products are then summed to produce the scalar field result (which has the same shape as the matrices in the matrix field).

    f2

    Scalar field operand which have the same field shape as this.

    returns

    Product of this and f2.

    Definition Classes
    Field
  156. val rows: Int

    Permalink

    "Rows" in the field.

    "Rows" in the field. See class description for meaning of rows.

    Definition Classes
    FieldParameters
  157. def shift(rowShift: Int, colShift: Int): Field

    Permalink

    Shift a 2D scalar field in both dimensions, pulling in zeroes where necessary.

    Shift a 2D scalar field in both dimensions, pulling in zeroes where necessary.

    rowShift

    Number of pixels to shift field.

    colShift

    Number of pixels to shift field.

    returns

    Shifted input field.

    Definition Classes
    Field
  158. def shift(colShift: Int): Field

    Permalink

    Shift a 1D scalar field left (negative colShift) or right (positive colShift), pulling in zeroes where necessary.

    Shift a 1D scalar field left (negative colShift) or right (positive colShift), pulling in zeroes where necessary.

    colShift

    Number of pixels to shift field.

    returns

    Shifted input field.

    Definition Classes
    Field
  159. def shiftCyclic(rowShift: Int, colShift: Int): Field

    Permalink

    Shift a 2D scalar field in both dimensions, pulling in values from the opposite side where necessary.

    Shift a 2D scalar field in both dimensions, pulling in values from the opposite side where necessary. Negative shift amounts result in shifts up and to the left, while positive shift amounts result in shifts down and to the right.

    rowShift

    Number of pixels to shift field.

    colShift

    Number of pixels to shift field.

    returns

    Shifted input field.

    Definition Classes
    Field
  160. def shiftCyclic(colShift: Int): Field

    Permalink

    Shift a 1D scalar field left (negative colShift) or right (positive colShift), pulling in values from the opposite side where necessary.

    Shift a 1D scalar field left (negative colShift) or right (positive colShift), pulling in values from the opposite side where necessary.

    colShift

    Number of pixels to shift field.

    returns

    Shifted input field.

    Definition Classes
    Field
  161. def signum: Field

    Permalink

    Apply the signum operator to every numeric element in this.

    Apply the signum operator to every numeric element in this.

    Signum(x) is defined to be:

    1 if x > 0

    0 if x == 0

    -1 if x < 0

    returns

    Field equal to input field with each element, x, mapped to signum(x).

    Definition Classes
    Field
  162. def sin: Field

    Permalink

    Apply the sine operator to every numeric element in this.

    Apply the sine operator to every numeric element in this.

    returns

    Field equal to input field with each element, x, mapped to sin(x).

    Definition Classes
    Field
  163. def sinh: Field

    Permalink

    Apply the hyperbolic sine operator to every numeric element in this.

    Apply the hyperbolic sine operator to every numeric element in this.

    returns

    Field equal to input field with each element, x, mapped to sinh(x).

    Definition Classes
    Field
  164. def sinks: Seq[Operation]

    Permalink

    Get the sinks of this hyperedge.

    Get the sinks of this hyperedge.

    Definition Classes
    Hyperedge
  165. def solve(b: Field): Field

    Permalink

    Solve Ax = b for x, where A is matrix field, this, and b is the vector field argument.

    Solve Ax = b for x, where A is matrix field, this, and b is the vector field argument.

    This actually solves the equation for each matrix / vector pair in the fields this and b, producing a vector field representing x. The vectors in b must be length 2 and the matrices in this must be 2 x 2. Solves the equations using the pseudo inverse

    b

    Vector field argument.

    returns

    The solution, x, to the set of linear equations.

    Definition Classes
    Field
  166. def source: Operation

    Permalink

    Get the source of this hyperedge.

    Get the source of this hyperedge.

    Definition Classes
    Hyperedge
  167. def sourceOutputIndex: Option[Int]

    Permalink

    Get the output index of this hyperedge on the source.

    Get the output index of this hyperedge on the source.

    Definition Classes
    Hyperedge
  168. def sq: Field

    Permalink

    Apply the square operator to every numeric element in this.

    Apply the square operator to every numeric element in this.

    returns

    Field equal to input field with each element, x, mapped to (x * x).

    Definition Classes
    Field
  169. def sqrt: Field

    Permalink

    Apply the square root operator to every numeric element in this.

    Apply the square root operator to every numeric element in this.

    returns

    Field equal to input field with each element, x, mapped to sqrt(x).

    Definition Classes
    Field
  170. def stealSinksFrom(from: Hyperedge[Operation], exceptSink: Operation = null.asInstanceOf[T]): Unit

    Permalink

    Steal sinks from another edge, from, and add them to this. One can avoid stealing sinks that are a single exceptSink node.

    Steal sinks from another edge, from, and add them to this. One can avoid stealing sinks that are a single exceptSink node. This is useful in merging a source node into a sink node, where the source -> sink connection is probed or has additional sinks outside the merged kernel. In that case, the output of the merged kernel wants to steal the sinks of the source -> sink connection edge, but does not want to include the sink.

    This makes the from useless since it is no longer used by any other node.

    from

    The edge from which to steal outputs;

    exceptSink

    The sink to not transfer from from to this;

    Definition Classes
    Hyperedge
  171. def subfield(guide: Field, shape: cogmath.geometry.Shape, border: platform.types.BorderPolicy = BorderClamp): Field

    Permalink

    Extracts a window from a 1D or 2D scalar, vector or matrix field, guided by a 0D vector field called "the guide." The guide specifies the upper-left-most (or left-most for 1D fields) point of the window, and shape specifies the size of the window.

    Extracts a window from a 1D or 2D scalar, vector or matrix field, guided by a 0D vector field called "the guide." The guide specifies the upper-left-most (or left-most for 1D fields) point of the window, and shape specifies the size of the window.

    A guiding vector with value (v1, v2) means a given point (row, col) extracts the element at location (row + v1, col + v2) as its output. If that location falls outside of the field, the BorderPolicy attached to the the opcode determines how the missing value is computed. If either of the guide vector components v1 and v2 is non-integral, bilinear interpolation is used to to determine the approximate value.

    guide

    The guide vector.

    shape

    Shape of the window.

    border

    Policy for handling border processing.

    returns

    Extracted window.

    Definition Classes
    Field
  172. def subfields(diameter: Int): Field

    Permalink

    Extract all subfields from a 2D scalar field into a 2-D vector field.

    Extract all subfields from a 2D scalar field into a 2-D vector field.

    diameter

    Sizes (rows and columns) of each subfield. Must be odd.

    returns

    A 2-D vector field where the length of the vector equals the number of diameter x diameter subfields in the input. For example, a 4 x 4 input field has four subfields of size 3 x 3, so this operator would return a 2-D vector field of size 3 x 3 (the size of the subfields) with vectors of length 4. Each layer of the vector field is one subfield of of the input.

    Definition Classes
    Field
  173. def supersample: Field

    Permalink

    Supersample a scalar field by 2X in each dimension, replicating pixels to fill in the gaps.

    Supersample a scalar field by 2X in each dimension, replicating pixels to fill in the gaps.

    returns

    Input field expanded by 2X in each dimension with pixel replication.

    Definition Classes
    Field
  174. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  175. def tan: Field

    Permalink

    Apply the tangent operator to every numeric element in this.

    Apply the tangent operator to every numeric element in this.

    returns

    Field equal to input field with each element, x, mapped to tan(x).

    Definition Classes
    Field
  176. def tanh: Field

    Permalink

    Apply the hyperbolic tangent operator to every numeric element in this.

    Apply the hyperbolic tangent operator to every numeric element in this.

    returns

    Field equal to input field with each element, x, mapped to tanh(x).

    Definition Classes
    Field
  177. val tensorOrder: Int

    Permalink

    Order of the tensors in the field.

    Order of the tensors in the field.

    Definition Classes
    FieldParameters
  178. val tensorShape: cogmath.geometry.Shape

    Permalink

    Shape of the tensors in the field.

    Shape of the tensors in the field.

    Definition Classes
    FieldParameters
  179. def toColorField: ColorField

    Permalink

    Explicit conversion of a Field to a ColorField.

    Explicit conversion of a Field to a ColorField. Field is abstract, so this method will perform the appropriate type coercion if the field is already a ColorField but stored in a Field variable. This method also supports converting a ScalarField or VectorField to a ColorField.

    returns

    The converted field.

    Definition Classes
    Field
  180. def toComplexField: ComplexField

    Permalink

    Explicit conversion of a Field to a ComplexField.

    Explicit conversion of a Field to a ComplexField. Field is abstract, so this method will perform the appropriate type coercion if the field is already a ComplexField but stored in a Field variable. This method also supports converting a ScalarField to a ComplexField.

    returns

    The converted field.

    Definition Classes
    Field
  181. def toComplexVectorField: ComplexVectorField

    Permalink

    Explicit conversion of a Field to a ComplexVectorField.

    Explicit conversion of a Field to a ComplexVectorField. Field is abstract, so this method will perform the appropriate type coercion if the field is already a ComplexVectorField but stored in a Field variable. This method also supports converting a VectorField to a ComplexVectorField.

    returns

    The converted field.

    Definition Classes
    Field
  182. def toGenericComplexField: Field

    Permalink

    Another explicit conversion, this time working on both ScalarFields and VectorFields.

    Another explicit conversion, this time working on both ScalarFields and VectorFields. The return type is Field though, the common base class of both ComplexFields and ComplexScalarFields.

    Definition Classes
    Field
  183. def toMatrixField: MatrixField

    Permalink

    Explicit conversion of a Field to a MatrixField.

    Explicit conversion of a Field to a MatrixField. Since Field is abstract, the only possible conversion is if the field is already a MatrixField but is stored in a Field variable. This merely does the necessary type coercion.

    returns

    The converted field.

    Definition Classes
    Field
  184. def toScalarField: ScalarField

    Permalink

    Explicit conversion of a Field to a ScalarField.

    Explicit conversion of a Field to a ScalarField. Since Field is abstract, the only possible conversion is if the field is already a ScalarField but is stored in a Field variable. This merely does the necessary type coercion.

    returns

    The converted field.

    Definition Classes
    Field
  185. def toString(): String

    Permalink

    Convert node to a string for debugging.

    Convert node to a string for debugging.

    Definition Classes
    RecurrenceTrait → AnyRef → Any
  186. def toVectorField: VectorField

    Permalink

    Explicit conversion of a Field to a VectorField.

    Explicit conversion of a Field to a VectorField. Field is abstract, so this method will perform the appropriate type coercion if the field is already a VectorField but stored in a Field variable. This method also supports converting a ColorField to a VectorField.

    returns

    The converted field.

    Definition Classes
    Field
  187. def transform(f2: Field): Field

    Permalink

    (1) Multiply a matrix field by a matrix field to produce a matrix field; or (2) multiply a matrix field by a vector field to produce a vector field.

    (1) Multiply a matrix field by a matrix field to produce a matrix field; or (2) multiply a matrix field by a vector field to produce a vector field.

    For case (1), corresponding matrices in this and f2 are multiplied using standard matrix multiplication to produce the corresponding matrix in the resulting matrix field.

    For case (2), corresponding matrix/vector pair in this and f2 are multiplied using standard matrix/vector multiplication to produce the corresponding vector (a linear transformation of the input vector) in the resulting vector field.

    f2

    Matrix field or vector field; must have the same field shape as this.

    returns

    Matrix field or vector representing the matrix multiplications of corresponding elements in the two input fields.

    Definition Classes
    Field
  188. def transpose: Field

    Permalink

    Transpose a 2D tensor field or color field.

    Transpose a 2D tensor field or color field.

    Definition Classes
    Field
  189. def transposeMatrices: Field

    Permalink

    Transpose all the matrices in a matrix field to produce a new matrix field.

    Transpose all the matrices in a matrix field to produce a new matrix field.

    returns

    Copy of input matrix field with all matrices transposed.

    Definition Classes
    Field
  190. def transposeVectors: Field

    Permalink

    Transpose each vector in a vector field to a single row matrix, thus creating a matrix field from a vector field

    Transpose each vector in a vector field to a single row matrix, thus creating a matrix field from a vector field

    returns

    Copy of input matrix field with all vectors transposed to single row matrices.

    Definition Classes
    Field
  191. def trim(resultShape: cogmath.geometry.Shape): Field

    Permalink

    "Trim" a field to a smaller size by clipping off indices (maintaining the origin).

    "Trim" a field to a smaller size by clipping off indices (maintaining the origin).

    resultShape

    Desired shape of the resulting field; must not be larger in any dimension than the corresponding dimension of the input field

    returns

    The trimmed field.

    Definition Classes
    Field
  192. def unary_-(): Field

    Permalink

    Multiply each number in a field by -1.

    Multiply each number in a field by -1.

    The resulting field has the same field shape and tensor shape as this.

    returns

    The negative of the input field.

    Definition Classes
    FieldCogOperatorAPI
  193. def upsample(factor: Int = 2, phase: Int = 0): Field

    Permalink

    Upsample with zeroes inserted between field points, increasing the size of the input in all dimensions.

    Upsample with zeroes inserted between field points, increasing the size of the input in all dimensions.

    Example: for input field {1,2,3}

    input.upsample(2) yields {1,0,2,0,3,0}

    input.upsample(2,1) yields {0,1,0,2,0,3}

    factor

    The sampling factor, defaults to 2.

    phase

    The offset within the scaled up field to put the input data, defaults to an offset of 0.

    Definition Classes
    Field
  194. def vectorElement(index: Int): Field

    Permalink

    Convert a vector field to a scalar field by extracting one element of each vector.

    Convert a vector field to a scalar field by extracting one element of each vector.

    index

    The element of each vector to be extracted.

    returns

    Input field with tensor order reduced by one.

    Definition Classes
    Field
  195. def vectorElements(indices: Field): Field

    Permalink

    Convert a vector field to a smaller vector field by extracting a dynamically indexed a range of elements

    Convert a vector field to a smaller vector field by extracting a dynamically indexed a range of elements

    returns

    Input field with tensor order reduced by one.

    Definition Classes
    Field
  196. implicit def vectorTo0DVectorField(v: cogmath.algebra.real.Vector): VectorField

    Permalink

    Implicit conversion of a Vector to a 0D constant VectorField which allows for fields to be combined with vectors in a simple way.

    Implicit conversion of a Vector to a 0D constant VectorField which allows for fields to be combined with vectors in a simple way. This makes it possible to express commutative operations with a common syntax.

    For example

    Field + Vector

    and

    Vector + Field

    are both legal and compilable with this implicit conversion.

    v

    The vector to be converted to a 0D vector field.

    returns

    A 0D vector field initialized to v.

    Definition Classes
    ImplicitConversions
  197. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  198. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  199. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  200. def warp(guide: Field, border: platform.types.BorderPolicy = BorderClamp): Field

    Permalink

    Warps a 2D scalar, vector or matrix field, guided by a vector field called "the guide." The guide must either be zero-dimensional, in which case the input field is translated uniformly, or must be a 2D vector field with exactly the same shape as the input.

    Warps a 2D scalar, vector or matrix field, guided by a vector field called "the guide." The guide must either be zero-dimensional, in which case the input field is translated uniformly, or must be a 2D vector field with exactly the same shape as the input.

    The guiding vector with value (v1, v2) at a given point (row, col) extracts the element at location (row - v1, col - v2) as its output. If that location falls outside of the field, the BorderPolicy attached to the the opcode determines how the missing value is computed. If either of the guide vector components v1 and v2 is non-integral, bilinear interpolation is used to to determine the approximate value.

    guide

    The guiding vector field.

    border

    Policy for handling borders.

    returns

    Input field, warped by the guide.

    Definition Classes
    Field
  201. var weight: Double

    Permalink

    Every hyperedge has a weight which is application defined.

    Every hyperedge has a weight which is application defined.

    Definition Classes
    Hyperedge
  202. def winnerTakeAll: Field

    Permalink

    Compute the "winner" of a scalar field by mapping its largest element to 1.0f and the other elements to 0.0f

    Compute the "winner" of a scalar field by mapping its largest element to 1.0f and the other elements to 0.0f

    This is not well-defined when multiple elements share the maximum value, so beware.

    returns

    A scalar field with the same shape as the input, with a single element containing 1.0f and the rest containing 0.0f.

    Definition Classes
    Field

Inherited from Field

Inherited from CogOperatorAPI

Inherited from FieldParameters

Inherited from FieldName

Inherited from ImplicitConversions

Inherited from RecurrenceTrait

Inherited from SemanticError

Inherited from CompilerError

Inherited from Hyperedge[Operation]

Inherited from AnyRef

Inherited from Any

Ungrouped