partialComparison partialComparison Icon

Compare.partialComparison

partialComparison()

Defines the base structure for comparison operations between two real-valued input signals (u1 and u2).

Variables

  • u1: First real input signal
  • u2: Second real input signal
  • y: Real output signal representing the result of the comparison (either 1.0 or 0.0)

Description

This partial component provides the common interface for all two-input comparison operations.

Usage

PrimitiveComponents.Compare.partialComparison()

Connectors

  • y - This connector represents a real signal as an output from a component (RealOutput)
  • u1 - This connector represents a real signal as an input to a component (RealInput)
  • u2 - This connector represents a real signal as an input to a component (RealInput)

Source

"""
    partialComparison()

Defines the base structure for comparison operations between two real-valued input signals (u1 and u2).

# Variables
- `u1`: First real input signal
- `u2`: Second real input signal
- `y`: Real output signal representing the result of the comparison (either 1.0 or 0.0)

# Description
This partial component provides the common interface for all two-input comparison operations.
"""
partial component partialComparison
  # Real output signal representing the result of the comparison (either 1.0 or 0.0)
  y = Dyad.RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"x1": 1000, "x2": 1040, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0},
        "icon": {"x1": 1000, "x2": 1040, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0}
      }
    }
  }
  # First real input signal
  u1 = Dyad.RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"x1": -40, "x2": 0, "y1": 170, "y2": 210, "sh": 0.04, "sw": 0.04, "rot": 0},
        "icon": {"x1": -40, "x2": 0, "y1": 170, "y2": 210, "sh": 0.04, "sw": 0.04, "rot": 0}
      }
    }
  }
  # Second real input signal
  u2 = Dyad.RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"x1": -40, "x2": 0, "y1": 710, "y2": 750, "sh": 1, "sw": 1, "rot": 0},
        "icon": {"x1": -40, "x2": 0, "y1": 710, "y2": 750, "sh": 1, "sw": 1, "rot": 0}
      }
    }
  }
relations
end
Flattened Source
"""
    partialComparison()

Defines the base structure for comparison operations between two real-valued input signals (u1 and u2).

# Variables
- `u1`: First real input signal
- `u2`: Second real input signal
- `y`: Real output signal representing the result of the comparison (either 1.0 or 0.0)

# Description
This partial component provides the common interface for all two-input comparison operations.
"""
partial component partialComparison
  # Real output signal representing the result of the comparison (either 1.0 or 0.0)
  y = Dyad.RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"x1": 1000, "x2": 1040, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0},
        "icon": {"x1": 1000, "x2": 1040, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0}
      }
    }
  }
  # First real input signal
  u1 = Dyad.RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"x1": -40, "x2": 0, "y1": 170, "y2": 210, "sh": 0.04, "sw": 0.04, "rot": 0},
        "icon": {"x1": -40, "x2": 0, "y1": 170, "y2": 210, "sh": 0.04, "sw": 0.04, "rot": 0}
      }
    }
  }
  # Second real input signal
  u2 = Dyad.RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"x1": -40, "x2": 0, "y1": 710, "y2": 750, "sh": 1, "sw": 1, "rot": 0},
        "icon": {"x1": -40, "x2": 0, "y1": 710, "y2": 750, "sh": 1, "sw": 1, "rot": 0}
      }
    }
  }
relations
metadata {}
end


Test Cases

No test cases defined.

  • Examples
  • Experiments
  • Analyses