Class SumofAbsoluteDifferences

    • Field Detail

      • previousImageBlock

        public TypedIOPort previousImageBlock
        Input for tokens to be a part of previous frame. This is a single port, and its type is 2D array.
      • currentImageBlock

        public TypedIOPort currentImageBlock
        Input for tokens to be a part of current frame. This is a single port, and its type is 2D array.
      • sumAbsoluteDifference

        public TypedIOPort sumAbsoluteDifference
        Output port. This is a result for calculating sum of absolute differences between ImgBlockA and ImgBlockB. The type is inferred form the connections.
      • blockSize

        public Parameter blockSize
        BlockSize parameter. This is given by a number of elements in a block. Macro Block in
      • _blockSize

        protected int _blockSize
        Description of the variable.
    • Method Detail

      • fire

        public void fire()
                  throws IllegalActionException
        If there is at least one token on the input ports, add tokens from the plus port, subtract tokens from the minus port, and send the result to the output port. At most one token is read from each channel, so if more than one token is pending, the rest are left for future firings. If none of the input channels has a token, do nothing. If none of the plus channels have tokens, then the tokens on the minus channels are subtracted from a zero token of the same type as the first token encountered on the minus channels.
        Specified by:
        fire in interface Executable
        Overrides:
        fire in class AtomicActor<TypedIOPort>
        Throws:
        IllegalActionException - If there is no director, or if addition and subtraction are not supported by the available tokens.
      • preinitialize

        public void preinitialize()
                           throws IllegalActionException
        Description copied from class: AtomicActor
        Create receivers and declare delay dependencies. Derived classes can override this method to perform additional initialization functions, but they should call this base class methods or create the receivers themselves. This method gets executed exactly once prior to any other action methods. It cannot produce output data since type resolution is typically not yet done. It also gets invoked prior to any static scheduling that might occur in the domain, so it can change scheduling information.
        Specified by:
        preinitialize in interface Initializable
        Overrides:
        preinitialize in class AtomicActor<TypedIOPort>
        Throws:
        IllegalActionException - Not thrown in this base class.