@@ -10,8 +10,8 @@ import (
1010
1111// Point is a data point with x and y coordinates.
1212type Point struct {
13- x float64
14- y float64
13+ X float64
14+ Y float64
1515}
1616
1717// VCurve is a struct that holds the data points for the V-curve.
@@ -25,8 +25,8 @@ type VCurveParams struct {
2525 B float64
2626 C float64
2727 D float64
28- x []float64
29- y []float64
28+ X []float64
29+ Y []float64
3030}
3131
3232/*
@@ -43,8 +43,8 @@ func NewHyperbolicVCurve(data VCurve) *VCurveParams {
4343
4444 // A single loop to populate the slices
4545 for _ , point := range data .Points {
46- dataX = append (dataX , point .x )
47- dataY = append (dataY , point .y )
46+ dataX = append (dataX , point .X )
47+ dataY = append (dataY , point .Y )
4848 }
4949
5050 // Get the initial guess for the parameter, for A, we take the mean value of the yData:
@@ -61,8 +61,8 @@ func NewHyperbolicVCurve(data VCurve) *VCurveParams {
6161 B : B ,
6262 C : C ,
6363 D : 0 ,
64- x : dataX ,
65- y : dataY ,
64+ X : dataX ,
65+ Y : dataY ,
6666 }
6767}
6868
@@ -108,7 +108,7 @@ LevenbergMarquardtOptimisation optimizes the hyperbolic function using the Leven
108108func (p * VCurveParams ) LevenbergMarquardtOptimisation () (VCurveParams , error ) {
109109 // Setting up the optimizer:
110110 problem := optimize.Problem {
111- Func : objectiveFunc (p .x , p .y ),
111+ Func : objectiveFunc (p .X , p .Y ),
112112 }
113113
114114 // Create custom settings for the optimization:
0 commit comments