Skip to content

Commit dd74128

Browse files
Fix typos
1 parent d37e5e1 commit dd74128

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

src/lib.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ unsafe fn slice_to_mut_ptr<T>(slice: &[T]) -> *mut T {
152152
slice.as_ptr() as *mut T
153153
}
154154

155-
/// Builder structure to setup a graph partition computation.
155+
/// Builder structure to set up a graph partition computation.
156156
///
157157
/// This structure holds the required arguments for METIS to compute a
158158
/// partition. It also offers methods to easily set any optional argument.
@@ -284,7 +284,7 @@ impl<'a> Graph<'a> {
284284
/// The following invariants must be held, otherwise this function returns
285285
/// an error:
286286
///
287-
/// - all of the arrays have a length that can be held by an [`Idx`],
287+
/// - all the arrays have a length that can be held by an [`Idx`],
288288
/// - `ncon` is strictly greater than zero,
289289
/// - `nparts` is strictly greater than zero,
290290
/// - `xadj` has at least one element (its length is the one more than the
@@ -375,7 +375,7 @@ impl<'a> Graph<'a> {
375375
/// - `ncon` is not strictly greater than zero, or
376376
/// - `nparts` is not strictly greater than zero, or
377377
/// - `xadj` is empty, or
378-
/// - the length of `adjncy` is different than the last element of `xadj`.
378+
/// - the length of `adjncy` is different from the last element of `xadj`.
379379
///
380380
/// # Mutability
381381
///
@@ -411,7 +411,7 @@ impl<'a> Graph<'a> {
411411

412412
/// Sets the computational weights of the vertices.
413413
///
414-
/// By default all vertices have the same weight.
414+
/// By default, all vertices have the same weight.
415415
///
416416
/// The `ncon` weights of the `i`th vertex must be located in
417417
/// `vwgt[i*ncon..(i+1)*ncon]`, and all elements of `vwgt` must be positive.
@@ -429,7 +429,7 @@ impl<'a> Graph<'a> {
429429

430430
/// Sets the communication weights of the vertices.
431431
///
432-
/// By default all vertices have the same communication weight.
432+
/// By default, all vertices have the same communication weight.
433433
///
434434
/// Vertices can only have one communication weight. The length of `vsize`
435435
/// does not depend on `ncon`.
@@ -447,7 +447,7 @@ impl<'a> Graph<'a> {
447447

448448
/// Sets the weights of the edges.
449449
///
450-
/// By default all edges have the same weight.
450+
/// By default, all edges have the same weight.
451451
///
452452
/// All elements of `adjwgt` must be positive.
453453
///
@@ -464,7 +464,7 @@ impl<'a> Graph<'a> {
464464

465465
/// Sets the target partition weights for each part and constraint.
466466
///
467-
/// By default the graph is divided equally.
467+
/// By default, the graph is divided equally.
468468
///
469469
/// The target partition weight for the `i`th part and `j`th constraint is
470470
/// specified at `tpwgts[i*ncon+j]`. For each constraint `j`, the sum of the
@@ -484,7 +484,7 @@ impl<'a> Graph<'a> {
484484

485485
/// Sets the load imbalance tolerance for each constraint.
486486
///
487-
/// By default it equals to 1.001 if `ncon` equals 1 and 1.01 otherwise.
487+
/// By default, it equals to 1.001 if `ncon` equals 1 and 1.01 otherwise.
488488
///
489489
/// For the `i`th partition and `j`th constraint the allowed weight is the
490490
/// `ubvec[j]*tpwgts[i*ncon+j]` fraction of the `j`th's constraint total
@@ -779,7 +779,7 @@ fn check_mesh_structure(eptr: &[Idx], eind: &[Idx]) -> StdResult<(Idx, Idx), New
779779
Ok((ne, max_node + 1))
780780
}
781781

782-
/// Builder structure to setup a mesh partition computation.
782+
/// Builder structure to set up a mesh partition computation.
783783
///
784784
/// This structure holds the required arguments for METIS to compute a
785785
/// partition. It also offers methods to easily set any optional argument.
@@ -886,7 +886,7 @@ impl<'a> Mesh<'a> {
886886
/// - `nn` is not strictly greater than zero, or
887887
/// - `nparts` is not strictly greater than zero, or
888888
/// - `eptr` is empty, or
889-
/// - the length of `eind` is different than the last element of `eptr`.
889+
/// - the length of `eind` is different from the last element of `eptr`.
890890
///
891891
/// # Mutability
892892
///
@@ -921,7 +921,7 @@ impl<'a> Mesh<'a> {
921921

922922
/// Sets the computational weights of the elements.
923923
///
924-
/// By default all elements have the same weight.
924+
/// By default, all elements have the same weight.
925925
///
926926
/// All elements of `vwgt` must be positive.
927927
///
@@ -938,7 +938,7 @@ impl<'a> Mesh<'a> {
938938

939939
/// Sets the communication weights of the elements.
940940
///
941-
/// By default all elements have the same communication weight.
941+
/// By default, all elements have the same communication weight.
942942
///
943943
/// # Panics
944944
///
@@ -953,7 +953,7 @@ impl<'a> Mesh<'a> {
953953

954954
/// Sets the target partition weights for each part.
955955
///
956-
/// By default the mesh is divided equally.
956+
/// By default, the mesh is divided equally.
957957
///
958958
/// The sum of the target partition weights must be 1.0.
959959
///

src/option.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub trait Opt: private::Sealed {
3030

3131
/// Specifies the partitioning method.
3232
pub enum PType {
33-
/// Multilevel recursive bisectioning.
33+
/// Multilevel recursive bisection.
3434
Rb,
3535

3636
/// Multilevel k-way partitioning.
@@ -149,8 +149,8 @@ impl Opt for RType {
149149
}
150150
}
151151

152-
/// Specifies the number of different partitionings that it will compute. The
153-
/// final partitioning is the one that achieves the best edgecut or
152+
/// Specifies the number of different partitions that it will compute. The
153+
/// final partition is the one that achieves the best edge cut or
154154
/// communication volume. Default is 1.
155155
pub struct NCuts(pub Idx);
156156

@@ -244,7 +244,7 @@ impl Opt for MinConn {
244244
}
245245
}
246246

247-
/// Specifies that the coarsening will not perform any 2-hop matchings when the
247+
/// Specifies that the coarsening will not perform any 2-hop matching when the
248248
/// standards matching approach fails to sufficiently coarsen the graph.
249249
///
250250
/// The 2-hop matching is very effective for graphs with power-law degree
@@ -275,7 +275,7 @@ impl Opt for Contig {
275275
}
276276
}
277277

278-
/// Specifies that the graph should be compressed by combining together vertices
278+
/// Specifies that the graph should be compressed by combining vertices
279279
/// that have identical adjacency lists.
280280
pub struct Compress(pub bool);
281281

@@ -307,14 +307,14 @@ impl Opt for CCOrder {
307307
/// than `0.1*x*(average degree)` are removed from the graph, an ordering of the
308308
/// rest of the vertices is computed, and an overall ordering is computed by
309309
/// ordering the removed vertices at the end of the overall ordering. For
310-
/// example if `x == 40`, and the average degree is 5, then the algorithmwill
310+
/// example if `x == 40`, and the average degree is 5, then the algorithm will
311311
/// remove all vertices with degree greater than 20. The vertices that are
312312
/// removed are ordered last (i.e., they are automatically placed in the
313313
/// top-level separator). Good values are often in the range of 60 to 200 (i.e.,
314314
/// 6 to 20 times more than the average). Default value is 0, indicating that no
315315
/// vertices are removed.
316316
///
317-
/// Used to control whether or not the ordering algorithm should remove any
317+
/// Used to control whether the ordering algorithm should remove any
318318
/// vertices with high degree (i.e., dense columns). This is particularly
319319
/// helpful for certain classes of LP matrices, in which there a few vertices
320320
/// that are connected to many other vertices. By removing these vertices prior
@@ -335,7 +335,7 @@ impl Opt for PFactor {
335335
///
336336
/// A value of `x` indicates that the allowed load imbalance is `(1 + x)/1000`.
337337
/// The load imbalance for the `j`th constraint is defined to be
338-
/// `max_i(w[j,i])/t[j,i])`, where `w[j,i]` is the fraction of the overall
338+
/// `max_i(w[j,i]/t[j,i])`, where `w[j,i]` is the fraction of the overall
339339
/// weight of the `j`th constraint that is assigned to the`i`th partition and
340340
/// `t[j,i]` is the desired target weight of the `j`th constraint for the `i`th
341341
/// partition (i.e., that specified via `-tpwgts`). For `-ptype=rb`, the default

0 commit comments

Comments
 (0)