Record Class RopeScaling.Linear
java.lang.Object
java.lang.Record
ai.beestream.jitnn.RopeScaling.Linear
- All Implemented Interfaces:
RopeScaling
- Enclosing interface:
RopeScaling
Positions divided by
factor.-
Nested Class Summary
Nested classes/interfaces inherited from interface RopeScaling
RopeScaling.Linear, RopeScaling.Llama3 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleapply(double frequency) The frequency used in place offrequency(radians per position).final booleanIndicates whether some other object is "equal to" this one.doublefactor()Returns the value of thefactorrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Linear
public Linear(double factor) Creates an instance of aLinearrecord class.- Parameters:
factor- the value for thefactorrecord component
-
-
Method Details
-
apply
public double apply(double frequency) Description copied from interface:RopeScalingThe frequency used in place offrequency(radians per position).- Specified by:
applyin interfaceRopeScaling
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
factor
public double factor()Returns the value of thefactorrecord component.- Returns:
- the value of the
factorrecord component
-