// Create a vector of length 5 initialized with all zeros vec := GslVectorAlloc(5) defer vec.Free()
// Fill the vector with a constant value vec.SetAll(3.14)
// Scale the vector by a constant factor vec.Scale(2.0)
// Create two vectors vec1 := GslVectorAlloc(5) vec2 := GslVectorAlloc(5) defer vec1.Free() defer vec2.Free() vec1.SetAll(1.0) vec2.SetAll(2.0) // Compute the dot product of vec1 and vec2 dotProd := vec1.Dot(vec2)Overall, the github.com.dtromb.gogsl.vector GslVector package library provides a collection of methods to work with vectors, such as creating vectors, filling vectors with values, scaling vectors, and computing dot products.