@@ -14,7 +14,7 @@ pub enum BitOrder {
1414///
1515/// This type is typically used as a compact or efficient
1616/// representation before expanding into an explicit GF(2) matrix.
17- pub struct InterGF2Matrix < T : Number > {
17+ pub struct PackedGF2Matrix < T : Number > {
1818 elements : Vec < T > ,
1919 n : usize ,
2020}
@@ -37,7 +37,7 @@ pub struct InterGF2Matrix<T: Number> {
3737// }
3838// }
3939
40- impl < T : Number > InterGF2Matrix < T > {
40+ impl < T : Number > PackedGF2Matrix < T > {
4141 /// Creates a new integer-encoded matrix.
4242 ///
4343 /// # Arguments
@@ -48,9 +48,9 @@ impl<T: Number> InterGF2Matrix<T> {
4848 /// # Example
4949 ///
5050 /// ```rust
51- /// # use lin_algebra::int_gf2_matrix::InterGF2Matrix ;
51+ /// # use lin_algebra::packed_gf2_matrix::PackedGF2Matrix ;
5252 ///
53- /// let m = InterGF2Matrix ::new(vec![0b1011u8, 0b0101u8], 4);
53+ /// let m = PackedGF2Matrix ::new(vec![0b1011u8, 0b0101u8], 4);
5454 /// ```
5555 pub fn new ( elements : Vec < T > , n : usize ) -> Self {
5656 Self {
@@ -114,9 +114,9 @@ impl<T: Number> InterGF2Matrix<T> {
114114 /// # Example
115115 ///
116116 /// ```rust
117- /// # use lin_algebra::int_gf2_matrix ::{InterGF2Matrix , BitOrder};
117+ /// # use lin_algebra::packed_gf2_matrix ::{PackedGF2Matrix , BitOrder};
118118 ///
119- /// let m = InterGF2Matrix ::new(vec![0b0010u8], 4);
119+ /// let m = PackedGF2Matrix ::new(vec![0b0010u8], 4);
120120 /// let gf2 = m.from_int_matrix_to_gf2_matrix(BitOrder::LSB);
121121 ///
122122 /// // Result: [[0, 1, 0, 0]]
@@ -171,7 +171,7 @@ mod tests {
171171 #[ test]
172172 fn test_from_int_matrix_to_gf2_matrix_u8_lsb ( ) {
173173 let elements = vec ! [ 0 , 1 , 2 , 4 , 8 ] ;
174- let int_matrix = InterGF2Matrix :: < u8 > :: new ( elements. clone ( ) , 4 ) ;
174+ let int_matrix = PackedGF2Matrix :: < u8 > :: new ( elements. clone ( ) , 4 ) ;
175175 let gf2_matrix = int_matrix. from_int_matrix_to_gf2_matrix ( BitOrder :: LSB ) ;
176176 let expected = vec ! [
177177 vec![ 0 , 0 , 0 , 0 ] ,
@@ -183,7 +183,7 @@ mod tests {
183183 assert_eq ! ( gf2_matrix. elements, expected) ;
184184
185185 let elements = vec ! [ 0 , 1 , 2 , 3 , 5 ] ;
186- let int_matrix = InterGF2Matrix :: < u8 > :: new ( elements. clone ( ) , 4 ) ;
186+ let int_matrix = PackedGF2Matrix :: < u8 > :: new ( elements. clone ( ) , 4 ) ;
187187 let gf2_matrix = int_matrix. from_int_matrix_to_gf2_matrix ( BitOrder :: LSB ) ;
188188 let expected = vec ! [
189189 vec![ 0 , 0 , 0 , 0 ] ,
@@ -198,7 +198,7 @@ mod tests {
198198 #[ test]
199199 fn test_from_int_matrix_to_gf2_matrix_u8_msb ( ) {
200200 let elements = vec ! [ 0 , 1 , 2 , 4 , 8 ] ;
201- let int_matrix = InterGF2Matrix :: < u8 > :: new ( elements. clone ( ) , 4 ) ;
201+ let int_matrix = PackedGF2Matrix :: < u8 > :: new ( elements. clone ( ) , 4 ) ;
202202 let gf2_matrix = int_matrix. from_int_matrix_to_gf2_matrix ( BitOrder :: MSB ) ;
203203 let expected = vec ! [
204204 vec![ 0 , 0 , 0 , 0 ] ,
@@ -210,7 +210,7 @@ mod tests {
210210 assert_eq ! ( gf2_matrix. elements, expected) ;
211211
212212 let elements = vec ! [ 0 , 1 , 2 , 3 , 5 ] ;
213- let int_matrix = InterGF2Matrix :: < u8 > :: new ( elements. clone ( ) , 4 ) ;
213+ let int_matrix = PackedGF2Matrix :: < u8 > :: new ( elements. clone ( ) , 4 ) ;
214214 let gf2_matrix = int_matrix. from_int_matrix_to_gf2_matrix ( BitOrder :: MSB ) ;
215215 let expected = vec ! [
216216 vec![ 0 , 0 , 0 , 0 ] ,
0 commit comments