java.lang.Object
java.lang.Record
pl.polsl.rtsa.model.SignalResult
- Record Components:
timeDomainData- The array of voltage samples in the time domain.freqDomainData- The array of magnitude values in the frequency domain.sampleRate- The sampling rate (in Hz) used to capture this data.
public record SignalResult(double[] timeDomainData, double[] freqDomainData, double sampleRate)
extends Record
A record representing a snapshot of signal data.
Contains both the raw time-domain samples and the processed frequency-domain magnitude spectrum.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final double[]The field for thefreqDomainDatarecord component.private final doubleThe field for thesampleRaterecord component.private final double[]The field for thetimeDomainDatarecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSignalResult(double[] timeDomainData, double[] freqDomainData, double sampleRate) Creates an instance of aSignalResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.double[]Returns the value of thefreqDomainDatarecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thesampleRaterecord component.double[]Returns the value of thetimeDomainDatarecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
timeDomainData
private final double[] timeDomainDataThe field for thetimeDomainDatarecord component. -
freqDomainData
private final double[] freqDomainDataThe field for thefreqDomainDatarecord component. -
sampleRate
private final double sampleRateThe field for thesampleRaterecord component.
-
-
Constructor Details
-
SignalResult
public SignalResult(double[] timeDomainData, double[] freqDomainData, double sampleRate) Creates an instance of aSignalResultrecord class.- Parameters:
timeDomainData- the value for thetimeDomainDatarecord componentfreqDomainData- the value for thefreqDomainDatarecord componentsampleRate- the value for thesampleRaterecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
timeDomainData
public double[] timeDomainData()Returns the value of thetimeDomainDatarecord component.- Returns:
- the value of the
timeDomainDatarecord component
-
freqDomainData
public double[] freqDomainData()Returns the value of thefreqDomainDatarecord component.- Returns:
- the value of the
freqDomainDatarecord component
-
sampleRate
public double sampleRate()Returns the value of thesampleRaterecord component.- Returns:
- the value of the
sampleRaterecord component
-