Skip to content

Commit

Permalink
Merge pull request #861 from bwignall/fix_misc_typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
dlwh authored Jul 8, 2024
2 parents 4a3ecdd + 9dffce7 commit 528e448
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion math/src/main/codegen/breeze/linalg/CanPad.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ object CanPadRight {
v.length match {
case optDim.n1 => v.copy
case num: Int if num < optDim.n1 => DenseVector(v.toArray ++ Array.tabulate(optDim.n1 - num)(p => padValue))
//ToDo 4: DenseVector.vertcat does not work due to implict problems
//ToDo 4: DenseVector.vertcat does not work due to implicit problems
//case num: Int if num < optDim.n1 => DenseVector.vertcat( v, DenseVector.tabulate(optDim.n1 - num)(p => padValue) )
case num: Int if optDim.n1 < num => v(0 until optDim.n1).copy //function should return a copy
case _ => throw new IllegalArgumentException("(n) specification incorrect: " + optDim.toString + " !")
Expand Down
2 changes: 1 addition & 1 deletion math/src/main/scala/breeze/io/RandomAccessFile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import spire.math.ULong
* both positive and negative values of Int64 (this is compatible with + and -, for use as timestamps, for example,
* but is of course not compatible with * and / operations)
*
* *implementation note: this class was not overriden from java.io.RandomAccessFile or implicitly "pimped," but instead
* *implementation note: this class was not overridden from java.io.RandomAccessFile or implicitly "pimped," but instead
* passes through to java.io.RandomAccessFile. This is mainly because the java.io.RandomAccessFile.readXXX functions are
* declared final, and cannot be overridden.
*/
Expand Down
2 changes: 1 addition & 1 deletion math/src/main/scala/breeze/linalg/SliceUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package breeze.linalg
import scala.collection.immutable.IndexedSeq

/**
* Utility class that handles negative row/column indicies and OOB checking
* Utility class that handles negative row/column indices and OOB checking
*
* @author Michael Petnuch
*/
Expand Down
2 changes: 1 addition & 1 deletion math/src/main/scala/breeze/optimize/LBFGSB.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import breeze.util.SerializableLogging
import breeze.macros._

/**
* This algorithm is refered the paper
* This algorithm is referred the paper
* "A LIMITED MEMOR Y ALGORITHM F OR BOUND CONSTRAINED OPTIMIZA TION" written by
* Richard H.Byrd   Peihuang Lu   Jorge Nocedal  and Ciyou Zhu
* Created by fanming.chen on 2015/3/7 0007.
Expand Down
4 changes: 2 additions & 2 deletions math/src/main/scala/breeze/optimize/StrongWolfe.scala
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ class StrongWolfeLineSearch(maxZoomIter: Int, maxLineSearchIter: Int) extends Cu
low = c
if (t == bound) {
logger.debug(
"Reach bound, satisfy sufficent decrease condition," +
"Reach bound, satisfy sufficient decrease condition," +
" but not curvature condition satisfied.")
return bound
} else {
t *= 1.5
if (t > bound) {
t = bound
}
logger.debug("Sufficent Decrease condition but not curvature condition satisfied. Increased t to: " + t)
logger.debug("Sufficient Decrease condition but not curvature condition satisfied. Increased t to: " + t)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ object NonlinearMinimizer {
if (args.length < 3) {
println("Usage: ProjectedQuasiNewton n lambda beta")
println(
"Test NonlinearMinimizer with a quadratic function of dimenion n and m equalities with lambda beta for elasticNet")
"Test NonlinearMinimizer with a quadratic function of dimension n and m equalities with lambda beta for elasticNet")
sys.exit(1)
}

Expand Down
4 changes: 2 additions & 2 deletions math/src/main/scala/breeze/signal/JavaCompatible.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ object JavaCompatible {
// <editor-fold defaultstate="collapsed" desc=" discrete Fourier transforms ">

/**Returns the discrete fourier transform.
* Use fourierTrC instead for complex array imput.
* Use fourierTr2/2C instead for 2D Fourier tranform.
* Use fourierTrC instead for complex array input.
* Use fourierTr2/2C instead for 2D Fourier transform.
*
*
* @return
Expand Down
4 changes: 2 additions & 2 deletions math/src/main/scala/breeze/util/Index.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ trait Index[T] extends Iterable[T] with (T => Int) with Serializable {
def indexOf(t: T): Int =
apply(t)

/** Returns the indexed items along with their indicies */
/** Returns the indexed items along with their indices */
def pairs: Iterator[(T, Int)]

/**
Expand Down Expand Up @@ -415,7 +415,7 @@ object EnumerationIndex {
*/
def unapply(i: Int): Option[t.Value] = Some[t.Value](t(i))

/** Returns the indexed items along with their indicies */
/** Returns the indexed items along with their indices */
def pairs: Iterator[(t.Value, Int)] = for (v <- t.values.iterator) yield v -> v.id

def iterator: Iterator[t.Value] = t.values.iterator
Expand Down
2 changes: 1 addition & 1 deletion math/src/main/scala/breeze/util/IsomorphismIndex.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class IsomorphismIndex[T, U](val innerIndex: Index[T])(implicit iso: Isomorphism
*/
def unapply(i: Int): Option[U] = innerIndex.unapply(i).map(iso.forward)

/** Returns the indexed items along with their indicies */
/** Returns the indexed items along with their indices */
def pairs: Iterator[(U, Int)] = innerIndex.pairs.map(pair => (iso.forward(pair._1), pair._2))

def iterator: Iterator[U] = innerIndex.iterator.map(iso.forward)
Expand Down
2 changes: 1 addition & 1 deletion math/src/test/scala/breeze/linalg/DenseMatrixTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class DenseMatrixTest extends AnyFunSuite with Checkers with DoubleImplicits wit
test("Sliced Transpose") {
val m = DenseMatrix((0, 1, 2), (3, 4, 5))

// column of original looks same as row of tranpose
// column of original looks same as row of transpose
val sm1 = m(::, 1)
val smt1 = m.t(1, ::)
assert(sm1.t === smt1)
Expand Down
4 changes: 2 additions & 2 deletions math/src/test/scala/breeze/linalg/DenseVectorTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ class DenseVectorTest extends AnyFunSuite with Checkers {

}

test("Negation Tranpose") {
test("Negation Transpose") {
val a1 = DenseVector(1.0, 2.0, 3.0)
assert(-a1.t == DenseVector(-1.0, -2.0, -3.0).t)

Expand Down Expand Up @@ -456,7 +456,7 @@ class DenseVectorTest extends AnyFunSuite with Checkers {
assert(dv === DenseVector(1, 1, 2, 3, 4, 5, 6, 7, 8, 8))
}

test("clip tranpose") {
test("clip transpose") {
val dv = DenseVector.range(0, 10)
assert(clip(dv.t, 1, 8) === DenseVector(1, 1, 2, 3, 4, 5, 6, 7, 8, 8).t)
clip.inPlace(dv.t, 1, 8)
Expand Down
2 changes: 1 addition & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ object Common {
case _ => ???
}
},
// TODO: remove when possibl`e
// TODO: remove when possible
// publishArtifact in (Compile, packageDoc) := {
// CrossVersion.partialVersion(scalaVersion.value) match {
// case Some( (3, _)) => false
Expand Down
2 changes: 1 addition & 1 deletion viz/src/main/scala/breeze/plot/PaintScale.scala
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ object PaintScale {
}

//
// A large pallete of color literals from ProtoVis
// A large palette of color literals from ProtoVis
//
val aliceblue = Color.decode("#f0f8ff")
val antiquewhite = Color.decode("#faebd7")
Expand Down

0 comments on commit 528e448

Please sign in to comment.