RP

public struct RP : CustomStringConvertible, Equatable

RP instances contain reduction polynomials like x^m + x^k3 + x^k2 + x^k1 + 1 where m > k3 > k2 > k1 > 0 or x^m + x^k1 + 1 where m > k1 > 0

Initializers

  • Creates a reduction polynomial x^m + x^k3 + x^k2 + x^k1 + 1

    Declaration

    Swift

    public init(_ m: Int, _ k3: Int, _ k2: Int, _ k1: Int)

    Parameters

    m

    The m exponent

    k3

    The k3 exponent

    k2

    The k2 exponent

    k1

    The k1 exponent

  • Creates a reduction polynomial x^m + x^k1 + 1

    Declaration

    Swift

    public init(_ m: Int, _ k1: Int)

    Parameters

    m

    The m exponent

    k1

    The k3 exponent

Stored Properties

  • m

    The m exponent

    Declaration

    Swift

    public let m: Int
  • k3

    The k3 exponent

    Declaration

    Swift

    public let k3: Int
  • k2

    The k2 exponent

    Declaration

    Swift

    public let k2: Int
  • k1

    The k1 exponent

    Declaration

    Swift

    public let k1: Int
  • p

    The reduction polynomial as a BInt

    Declaration

    Swift

    public let p: BInt

Computed Properties

  • Textual description of self

    Declaration

    Swift

    public var description: String { get }

Instance Methods

  • Tests equality of reduction polynomials

    Declaration

    Swift

    public static func == (rp1: RP, rp2: RP) -> Bool

    Parameters

    rp1

    First reduction polynomial

    rp2

    Second reduction polynomial

    Return Value

    true iff rp1 = rp2