Class WeightedWaveFunction1D
- Namespace
- QuantumWaves
- Assembly
- QuantumLibrary.dll
Represents a weighted combination of one dimensional wave functions.
public sealed class WeightedWaveFunction1D : WaveFunction1D
- Inheritance
-
WeightedWaveFunction1D
- Inherited Members
Constructors
WeightedWaveFunction1D(ComplexF[], WaveFunction1D[])
Initializes a weighted wave function from coefficients and wave functions.
public WeightedWaveFunction1D(ComplexF[] startCoefficients, WaveFunction1D[] startWaveFunctions)
Parameters
startCoefficientsComplexF[]Initial coefficients.
startWaveFunctionsWaveFunction1D[]Initial wave functions.
Exceptions
- ArgumentNullException
Thrown if
startCoefficients,startWaveFunctions, or any wave function element is null.- ArgumentException
Thrown if no wave functions are provided or the array sizes do not match.
Properties
Coefficients
Gets the coefficients for each wave function.
public IReadOnlyList<ComplexF> Coefficients { get; }
Property Value
WaveFunctions
Gets the wave functions in the weighted sum.
public IReadOnlyList<WaveFunction1D> WaveFunctions { get; }
Property Value
Methods
Add(ComplexF, WaveFunction1D)
Adds a wave function with its coefficient.
public void Add(ComplexF coefficient, WaveFunction1D waveFunction)
Parameters
coefficientComplexFCoefficient for the wave function.
waveFunctionWaveFunction1DWave function to add.
Exceptions
- ArgumentNullException
Thrown if waveFunction is null.
EvaluateRaw(float, float)
Evaluates the weighted sum at (x, t).
protected override ComplexF EvaluateRaw(float x, float t)
Parameters
xfloatThe position at which to evaluate the weighted wave function.
tfloatThe time at which to evaluate the weighted wave function.
Returns
- ComplexF
The weighted sum of all component wave functions evaluated at
xandt.