模块 aya.base
程序包 org.aya.terck

记录类 CallMatrix<Def,Param>

java.lang.Object
java.lang.Record
org.aya.terck.CallMatrix<Def,Param>
所有已实现的接口:
org.aya.pretty.doc.Docile, Selector.Candidate<CallMatrix<Def,Param>>

public record CallMatrix<Def,Param>(@NotNull CallTerm callTerm, Def domain, Def codomain, @NotNull kala.collection.immutable.ImmutableSeq<Param> domainTele, @NotNull kala.collection.immutable.ImmutableSeq<Param> codomainTele, @NotNull Relation[][] matrix) extends Record implements org.aya.pretty.doc.Docile, Selector.Candidate<CallMatrix<Def,Param>>
A call matrix for a call `f --> g` has dimensions `arity(g) * arity(f)`. Each row corresponds to one argument in the call to `g` (the codomain). Each column corresponds to one formal argument of caller `f` (the domain).
另请参阅:
  • 构造器概要

    构造器
    构造器
    说明
    CallMatrix(@NotNull CallTerm callTerm, Def domain, Def codomain, @NotNull kala.collection.immutable.ImmutableSeq<Param> domainTele, @NotNull kala.collection.immutable.ImmutableSeq<Param> codomainTele)
     
    CallMatrix(@NotNull CallTerm callTerm, Def domain, Def codomain, @NotNull kala.collection.immutable.ImmutableSeq<Param> domainTele, @NotNull kala.collection.immutable.ImmutableSeq<Param> codomainTele, @NotNull Relation[][] matrix)
    创建 CallMatrix 记录类的实例。
  • 方法概要

    修饰符和类型
    方法
    说明
    @NotNull CallTerm
    返回 callTerm 记录组件的值。
    返回 codomain 记录组件的值。
    @NotNull kala.collection.immutable.ImmutableSeq<Param>
    返回 codomainTele 记录组件的值。
    int
     
    static <Def, Param>
    @NotNull CallMatrix<Def,Param>
    combine(@NotNull CallMatrix<Def,Param> A, @NotNull CallMatrix<Def,Param> B)
    Combine two call matrices if there exists an indirect call, for example: If `f` calls `g` with call matrix `A` and `g` calls `h` with call matrix `B`, the `f` indirectly calls `h` with call matrix `combine(A, B)` or `AB` in matrix notation.
    compare(@NotNull CallMatrix<Def,Param> other)
    Compare two call matrices by their decrease amount.
    返回 domain 记录组件的值。
    @NotNull kala.collection.immutable.ImmutableSeq<Param>
    返回 domainTele 记录组件的值。
    final boolean
    指示某个其他对象是否“等于”此对象。
    final int
    返回此对象的哈希代码值。
    @NotNull Relation[][]
    返回 matrix 记录组件的值。
    int
     
    void
    set(Param domain, Param codomain, @NotNull Relation relation)
     
    @NotNull org.aya.pretty.doc.Doc
     
    final String
    返回此记录类的字符串表示形式。

    从类继承的方法 java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    从接口继承的方法 org.aya.terck.Selector.Candidate

    notWorseThan
  • 构造器详细资料

    • CallMatrix

      public CallMatrix(@NotNull @NotNull CallTerm callTerm, @NotNull Def domain, @NotNull Def codomain, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<Param> domainTele, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<Param> codomainTele)
    • CallMatrix

      public CallMatrix(@NotNull @NotNull CallTerm callTerm, @NotNull Def domain, @NotNull Def codomain, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<Param> domainTele, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<Param> codomainTele, @NotNull @NotNull Relation[][] matrix)
      创建 CallMatrix 记录类的实例。
      参数:
      callTerm - callTerm 记录组件的值
      domain - domain 记录组件的值
      codomain - codomain 记录组件的值
      domainTele - domainTele 记录组件的值
      codomainTele - codomainTele 记录组件的值
      matrix - matrix 记录组件的值
  • 方法详细资料

    • rows

      public int rows()
    • cols

      public int cols()
    • set

      public void set(@NotNull Param domain, @NotNull Param codomain, @NotNull @NotNull Relation relation)
    • compare

      @NotNull public Selector.DecrOrd compare(@NotNull @NotNull CallMatrix<Def,Param> other)
      Compare two call matrices by their decrease amount.
      指定者:
      compare 在接口中 Selector.Candidate<Def>
    • combine

      @Contract(pure=true) @NotNull public static <Def, Param> @NotNull CallMatrix<Def,Param> combine(@NotNull @NotNull CallMatrix<Def,Param> A, @NotNull @NotNull CallMatrix<Def,Param> B)
      Combine two call matrices if there exists an indirect call, for example: If `f` calls `g` with call matrix `A` and `g` calls `h` with call matrix `B`, the `f` indirectly calls `h` with call matrix `combine(A, B)` or `AB` in matrix notation.
    • toDoc

      @NotNull public @NotNull org.aya.pretty.doc.Doc toDoc()
      指定者:
      toDoc 在接口中 org.aya.pretty.doc.Docile
    • toString

      public final String toString()
      返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。
      指定者:
      toString 在类中 Record
      返回:
      此对象的字符串表示形式
    • hashCode

      public final int hashCode()
      返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。
      指定者:
      hashCode 在类中 Record
      返回:
      此对象的哈希代码值
    • equals

      public final boolean equals(Object o)
      指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用 Objects::equals(Object,Object) 进行比较。
      指定者:
      equals 在类中 Record
      参数:
      o - 要与之进行比较的对象
      返回:
      如果此对象与 o 参数相同,则为 true;否则为 false
    • callTerm

      @NotNull public @NotNull CallTerm callTerm()
      返回 callTerm 记录组件的值。
      返回:
      callTerm 记录组件的值
    • domain

      @NotNull public Def domain()
      返回 domain 记录组件的值。
      返回:
      domain 记录组件的值
    • codomain

      @NotNull public Def codomain()
      返回 codomain 记录组件的值。
      返回:
      codomain 记录组件的值
    • domainTele

      @NotNull public @NotNull kala.collection.immutable.ImmutableSeq<Param> domainTele()
      返回 domainTele 记录组件的值。
      返回:
      domainTele 记录组件的值
    • codomainTele

      @NotNull public @NotNull kala.collection.immutable.ImmutableSeq<Param> codomainTele()
      返回 codomainTele 记录组件的值。
      返回:
      codomainTele 记录组件的值
    • matrix

      @NotNull public @NotNull Relation[][] matrix()
      返回 matrix 记录组件的值。
      返回:
      matrix 记录组件的值