<commit_before>package matrix

type CVector struct {
	column int
	matrix Matrix
}

func (v *CVector) Matrix() Matrix {
	return v.matrix
}

func (v *CVector) Size() int {
	row, _ := v.matrix.Shape()
	return row
}<commit_msg>Implement methods similar to "*RVector"'s methods for "*CVector".<commit_after>package matrix

type CVector struct {
	column    int
	undefined bool
	matrix    Matrix
}

func NewCVector(matrix Matrix, column int) *CVector {
	_, columns := matrix.Shape()

	v := &CVector{
		column:    column,
		undefined: column >= columns,
		matrix:    matrix,
	}

	return v
}

func (v *CVector) Matrix() Matrix {
	return v.matrix
}

func (v *CVector) Size() int {
	row, _ := v.matrix.Shape()
	return row
}

func (v *CVector) IsUndefined() bool {
	return v.undefined || v.matrix.IsUndefined()
}

func (v *CVector) Get(index int) (float64, error) {
	return v.matrix.Get(index, v.column)
}

func (v *CVector) Update(index int, value float64) *CVector {
	v.matrix.Update(index, v.column, value)

	return v
}
{'fraction_non_alphanumeric': 0.1316831683168317, 'fraction_numerical': 0.0039603960396039604, 'mean_word_length': 3.9317073170731707, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6492955', 'n_tokens_mistral': 367, 'n_tokens_neox': 357, 'n_words': 109}