object DataValueComparer
Implementation of data equality for two arbitrary ErgoTree data types.
- Alphabetic
- By Inheritance
- DataValueComparer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- type COA[A] = CollOverArray[A]
- type POC[A, B] = PairOfCols[A, B]
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final val CostKind_EQ_AvlTree: FixedCost
- final val CostKind_EQ_BigInt: FixedCost
- final val CostKind_EQ_Box: FixedCost
-
final
val
CostKind_EQ_COA_AvlTree: PerItemCost
Equals two CollOverArray of AvlTree type.
-
final
val
CostKind_EQ_COA_BigInt: PerItemCost
Equals two CollOverArray of BigInt type.
-
final
val
CostKind_EQ_COA_Boolean: PerItemCost
Equals two CollOverArray of Boolean type.
-
final
val
CostKind_EQ_COA_Box: PerItemCost
Equals two CollOverArray of Box type.
-
final
val
CostKind_EQ_COA_Byte: PerItemCost
Equals two CollOverArray of Byte type.
-
final
val
CostKind_EQ_COA_GroupElement: PerItemCost
Equals two CollOverArray of GroupElement type.
-
final
val
CostKind_EQ_COA_Header: PerItemCost
Equals two CollOverArray of Header type.
-
final
val
CostKind_EQ_COA_Int: PerItemCost
Equals two CollOverArray of Int type.
-
final
val
CostKind_EQ_COA_Long: PerItemCost
Equals two CollOverArray of Long type.
-
final
val
CostKind_EQ_COA_PreHeader: PerItemCost
Equals two CollOverArray of PreHeader type.
-
final
val
CostKind_EQ_COA_Short: PerItemCost
Equals two CollOverArray of Short type.
-
final
val
CostKind_EQ_Coll: PerItemCost
Equals two Colls of non-primitive (boxed) types.
-
final
val
CostKind_EQ_GroupElement: FixedCost
NOTE: the value is set based on benchmarking of SigmaDslSpecification.
- final val CostKind_EQ_Header: FixedCost
-
final
val
CostKind_EQ_Option: FixedCost
NOTE: In the formula
(7 + 1)
the 1 corresponds to the second type match. - final val CostKind_EQ_PreHeader: FixedCost
- final val CostKind_EQ_Prim: FixedCost
- final val CostKind_EQ_Tuple: FixedCost
- final val CostKind_MatchType: FixedCost
-
final
val
CostOf_MatchType: Int(1)
NOTE: The cost of most equality operations depends on the position in
match
statement.NOTE: The cost of most equality operations depends on the position in
match
statement. Thus the full cost to compare x and y equals DispatchCost * OperationCost, where DispatchCost = CasePosition * CostOf_MatchType, OperationCost is the type specific cost. For this reason reordering of cases may lead to divergence between an estimated and the actual execution cost (time). The constants are part of the consensus protocol and cannot be changed without forking. - final val EQ_AvlTree: OperationCostInfo[FixedCost]
- final val EQ_BigInt: OperationCostInfo[FixedCost]
- final val EQ_Box: OperationCostInfo[FixedCost]
- final val EQ_COA_AvlTree: OperationCostInfo[PerItemCost]
- final val EQ_COA_BigInt: OperationCostInfo[PerItemCost]
- final val EQ_COA_Boolean: OperationCostInfo[PerItemCost]
- final val EQ_COA_Box: OperationCostInfo[PerItemCost]
- final val EQ_COA_Byte: OperationCostInfo[PerItemCost]
- final val EQ_COA_GroupElement: OperationCostInfo[PerItemCost]
- final val EQ_COA_Header: OperationCostInfo[PerItemCost]
- final val EQ_COA_Int: OperationCostInfo[PerItemCost]
- final val EQ_COA_Long: OperationCostInfo[PerItemCost]
- final val EQ_COA_PreHeader: OperationCostInfo[PerItemCost]
- final val EQ_COA_Short: OperationCostInfo[PerItemCost]
- final val EQ_Coll: OperationCostInfo[PerItemCost]
- final val EQ_GroupElement: OperationCostInfo[FixedCost]
- final val EQ_Header: OperationCostInfo[FixedCost]
- final val EQ_Option: OperationCostInfo[FixedCost]
- final val EQ_PreHeader: OperationCostInfo[FixedCost]
- final val EQ_Prim: OperationCostInfo[FixedCost]
- final val EQ_Tuple: OperationCostInfo[FixedCost]
- final val MatchType: OperationCostInfo[FixedCost]
- final val OpDesc_EQ_AvlTree: NamedDesc
- final val OpDesc_EQ_BigInt: NamedDesc
- final val OpDesc_EQ_Box: NamedDesc
- final val OpDesc_EQ_COA_AvlTree: NamedDesc
- final val OpDesc_EQ_COA_BigInt: NamedDesc
- final val OpDesc_EQ_COA_Boolean: NamedDesc
- final val OpDesc_EQ_COA_Box: NamedDesc
- final val OpDesc_EQ_COA_Byte: NamedDesc
- final val OpDesc_EQ_COA_GroupElement: NamedDesc
- final val OpDesc_EQ_COA_Header: NamedDesc
- final val OpDesc_EQ_COA_Int: NamedDesc
- final val OpDesc_EQ_COA_Long: NamedDesc
- final val OpDesc_EQ_COA_PreHeader: NamedDesc
- final val OpDesc_EQ_COA_Short: NamedDesc
- final val OpDesc_EQ_Coll: NamedDesc
- final val OpDesc_EQ_GroupElement: NamedDesc
- final val OpDesc_EQ_Header: NamedDesc
- final val OpDesc_EQ_Option: NamedDesc
- final val OpDesc_EQ_PreHeader: NamedDesc
- final val OpDesc_EQ_Prim: NamedDesc
- final val OpDesc_EQ_Tuple: NamedDesc
- final val OpDesc_MatchType: NamedDesc
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val descriptors: AVHashMap[RType[_], (OperationCostInfo[FixedCost], OperationCostInfo[PerItemCost])]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equalColls[A](c1: Coll[A], c2: Coll[A])(implicit E: ErgoTreeEvaluator): Boolean
Compare two collections for equality.
Compare two collections for equality. Used when the element type A is NOT known statically. When the type A is scalar, each collection item is boxed before comparison, which have significant performace overhead. For this reason, this method is used as a fallback case.
-
def
equalColls_Dispatch[A](coll1: Coll[A], coll2: Coll[A])(implicit E: ErgoTreeEvaluator): Boolean
Compares two collections by dispatching to the most efficient implementation depending on the actual type A.
-
def
equalDataValues(l: Any, r: Any)(implicit E: ErgoTreeEvaluator): Boolean
Generic comparison of any two data values.
Generic comparison of any two data values. The method dispatches on a type of the left value and then performs the specific comparison. The comparison recursively descends on the value structure regardless of the depth. However, every step costs are accrued to
E.coster
and the defined limitE.coster.costLimit
is checked. Thus, the execution of this method is limited and always finishes at least as fast as the costLimit prescribes. No limit is structural depth is necessary. -
def
equalECPoint(p1: EcPointType, r: Any)(implicit E: ErgoTreeEvaluator): Boolean
Returns true if the given EcPointType is equal to the given object.
-
def
equalGroupElement(ge1: GroupElement, r: Any)(implicit E: ErgoTreeEvaluator): Boolean
Returns true if the given GroupElement is equal to the given object.
-
def
equalSigmaBoolean(l: SigmaBoolean, r: SigmaBoolean)(implicit E: ErgoTreeEvaluator): Boolean
Compare equality of two SigmaBoolean trees.
-
def
equalSigmaBooleans(xs: Seq[SigmaBoolean], ys: Seq[SigmaBoolean])(implicit E: ErgoTreeEvaluator): Boolean
Compare equality of two sequences of SigmaBoolean trees.
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()