src/fe_model/p2_local_model.rs

branch
dev
changeset 127
212f75931da0
parent 124
6aa955ad8122
child 133
2b13f8a0c8ba
equal deleted inserted replaced
126:0ccad3ee8e95 127:212f75931da0
138 // 1D planar model construction 138 // 1D planar model construction
139 // 139 //
140 140
141 impl<F: Float> RealInterval<F> { 141 impl<F: Float> RealInterval<F> {
142 #[inline] 142 #[inline]
143 fn midpoints(&self) -> [Loc<1, F>; 1] { 143 pub fn midpoints(&self) -> [Loc<1, F>; 1] {
144 let [ref n0, ref n1] = &self.0; 144 let [ref n0, ref n1] = &self.0;
145 let n01 = midpoint(n0, n1); 145 let n01 = midpoint(n0, n1);
146 [n01] 146 [n01]
147 } 147 }
148 } 148 }
185 // 185 //
186 186
187 impl<F: Float> PlanarSimplex<F> { 187 impl<F: Float> PlanarSimplex<F> {
188 #[inline] 188 #[inline]
189 /// Returns the midpoints of all the edges of the simplex 189 /// Returns the midpoints of all the edges of the simplex
190 fn midpoints(&self) -> [Loc<2, F>; 3] { 190 pub fn midpoints(&self) -> [Loc<2, F>; 3] {
191 let [ref n0, ref n1, ref n2] = &self.0; 191 let [ref n0, ref n1, ref n2] = &self.0;
192 let n01 = midpoint(n0, n1); 192 let n01 = midpoint(n0, n1);
193 let n12 = midpoint(n1, n2); 193 let n12 = midpoint(n1, n2);
194 let n20 = midpoint(n2, n0); 194 let n20 = midpoint(n2, n0);
195 [n01, n12, n20] 195 [n01, n12, n20]

mercurial