Advertisement
cwchen

[Go][excerpt] Creating a Vector class.

Oct 5th, 2017
825
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.15 KB | None | 0 0
  1. type Vector []float64
  2.  
  3. func NewVector(args ...float64) Vector {
  4.     return args
  5. }
  6.  
  7. func WithSize(s int) Vector {
  8.     v := make([]float64, s)
  9.  
  10.     return v
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement