<commit_before>//! Vectors with dimensions known at compile-time.

#[allow(missing_doc)]; // we allow missing to avoid having to document the vector components.

use std::cast;
use std::num::{Zero, One, Algebraic, Bounded};
use std::rand::Rng;
use std::vec::{VecIterator, VecMutIterator};
use std::iter::{Iterator, FromIterator};
use std::cmp::ApproxEq;

use traits::geometry::{Transform, Rotate, FromHomogeneous, ToHomogeneous, Dot, Norm,
                       Translation, Translate};
use traits::structure::{Basis, Cast, Dim, Indexable, Iterable, IterableMut};

mod metal;
mod vec_macros;

/// Vector of dimension 0.
#[deriving(Eq, Encodable, Decodable, Clone, DeepClone, Rand, Zero, ToStr)]
pub struct Vec0<N>;

/// Vector of dimension 1.
#[deriving(Eq, Encodable, Decodable, Clone, DeepClone, IterBytes, Rand, Zero, ToStr)]
pub struct Vec1<N> {
    /// First component of the vector.
    x: N
}

double_dispatch_binop_decl_trait!(Vec1, Vec1MulRhs)
double_dispatch_binop_decl_trait!(Vec1, Vec1DivRhs)
double_dispatch_binop_decl_trait!(Vec1, Vec1AddRhs)
double_dispatch_binop_decl_trait!(Vec1, Vec1SubRhs)
double_dispatch_cast_decl_trait!(Vec1, Vec1Cast)
mul_redispatch_impl!(Vec1, Vec1MulRhs)
div_redispatch_impl!(Vec1, Vec1DivRhs)<commit_msg>Remove unused import.<commit_after>//! Vectors with dimensions known at compile-time.

#[allow(missing_doc)]; // we allow missing to avoid having to document the vector components.

use std::cast;
use std::num::{Zero, One, Algebraic, Bounded};
use std::vec::{VecIterator, VecMutIterator};
use std::iter::{Iterator, FromIterator};
use std::cmp::ApproxEq;

use traits::geometry::{Transform, Rotate, FromHomogeneous, ToHomogeneous, Dot, Norm,
                       Translation, Translate};
use traits::structure::{Basis, Cast, Dim, Indexable, Iterable, IterableMut};

mod metal;
mod vec_macros;

/// Vector of dimension 0.
#[deriving(Eq, Encodable, Decodable, Clone, DeepClone, Rand, Zero, ToStr)]
pub struct Vec0<N>;

/// Vector of dimension 1.
#[deriving(Eq, Encodable, Decodable, Clone, DeepClone, IterBytes, Rand, Zero, ToStr)]
pub struct Vec1<N> {
    /// First component of the vector.
    x: N
}

double_dispatch_binop_decl_trait!(Vec1, Vec1MulRhs)
double_dispatch_binop_decl_trait!(Vec1, Vec1DivRhs)
double_dispatch_binop_decl_trait!(Vec1, Vec1AddRhs)
double_dispatch_binop_decl_trait!(Vec1, Vec1SubRhs)
double_dispatch_cast_decl_trait!(Vec1, Vec1Cast)
mul_redispatch_impl!(Vec1, Vec1MulRhs)
div_redispatch_impl!(Vec1, Vec1DivRhs)
{'fraction_non_alphanumeric': 0.1247987117552335, 'fraction_numerical': 0.014492753623188406, 'mean_word_length': 6.266081871345029, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4075503', 'n_tokens_mistral': 858, 'n_tokens_neox': 868, 'n_words': 215}