Skip to content

Commit

Permalink
Updated comments [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Jul 24, 2024
1 parent 9209298 commit f07e20f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion halfvec.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (v HalfVector) Slice() []float32 {
return v.vec
}

// String returns a string representation of the vector.
// String returns a string representation of the half vector.
func (v HalfVector) String() string {
buf := make([]byte, 0, 2+16*len(v.vec))
buf = append(buf, '[')
Expand Down
4 changes: 2 additions & 2 deletions sparsevec.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (v SparseVector) Slice() []float32 {
return vec
}

// String returns a string representation of the vector.
// String returns a string representation of the sparse vector.
func (v SparseVector) String() string {
buf := make([]byte, 0, 13+27*len(v.indices))
buf = append(buf, '{')
Expand Down Expand Up @@ -123,7 +123,7 @@ func (v *SparseVector) Parse(s string) error {
return nil
}

// EncodeBinary encodes a binary representation of a sparse vector.
// EncodeBinary encodes a binary representation of the sparse vector.
func (v SparseVector) EncodeBinary(buf []byte) (newBuf []byte, err error) {
nnz := len(v.indices)
buf = slices.Grow(buf, 12+8*nnz)
Expand Down
2 changes: 1 addition & 1 deletion vector.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (v *Vector) Parse(s string) error {
return nil
}

// EncodeBinary encodes a binary representation of a vector.
// EncodeBinary encodes a binary representation of the vector.
func (v Vector) EncodeBinary(buf []byte) (newBuf []byte, err error) {
dim := len(v.vec)
buf = slices.Grow(buf, 4+4*dim)
Expand Down

0 comments on commit f07e20f

Please sign in to comment.