class IndexEquationMapSolver extends ExpressionEquationIndexifier
Seek an approximately stable distribution for equations given in terms of indices, hence solving the equations (approximately). Here stable distribution is under the iteration to solve equations viewing them as fixed points. This is an implementation based on maps and keeping track of supports, which is not used as Vectors were more efficient.
- Alphabetic
- By Inheritance
- IndexEquationMapSolver
- ExpressionEquationIndexifier
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new IndexEquationMapSolver(initMap: Map[Expression, Double], equationVec: Vector[Equation], params: (Coeff[_]) => Option[Double], maxRatio: Double, resolution: Double, exponent: Double, decay: Double, maxTime: Option[Long], previousMap: Option[Map[Expression, Double]])
- initMap
initial values of some expressions
- params
values of coefficients in the equations
- maxRatio
bound on ratio of stabilization
- resolution
additive scale for stabilization and some auxiliary quantities
- exponent
the next step is stabilized using geometric means, weighted by the exponent
- decay
decay of the exponent, to allow steps to be damped progressively more
- maxTime
time in milliseconds for timing out stabilizations
- previousMap
an optional previous map to initialize
Value Members
- lazy val constantEquations: Set[Int]
- Definition Classes
- ExpressionEquationIndexifier
- lazy val constantMap: Map[Int, Double]
- def equationGradients(v: ParSeq[Double]): ParVector[ParVector[Double]]
- Definition Classes
- ExpressionEquationIndexifier
- val equationVec: Vector[Equation]
- Definition Classes
- ExpressionEquationIndexifier
- lazy val finalDistMap: Map[Expression, Double]
- lazy val finalStableMap: Map[Int, Double]
- def getProd(exp: Expression): ProductIndexExpression
- Definition Classes
- ExpressionEquationIndexifier
- lazy val indexMap: Map[Expression, Int]
- Definition Classes
- ExpressionEquationIndexifier
- lazy val initPar: ParMap[Expression, Double]
- Definition Classes
- ExpressionEquationIndexifier
- lazy val initTermIndices: Vector[Int]
- Definition Classes
- ExpressionEquationIndexifier
- lazy val initTypIndices: Vector[Int]
- Definition Classes
- ExpressionEquationIndexifier
- def mapToIndexMap[V](m: Map[Expression, V]): Map[Int, V]
- Definition Classes
- ExpressionEquationIndexifier
- def nextMap(m: Map[Int, Double], support: Set[Int], exponent: Double): Map[Int, Double]
the next map, assuming support is stable and is the support except for terms that stay constant
the next map, assuming support is stable and is the support except for terms that stay constant
- m
the present map
- support
the indices to update
- exponent
exponent for geometric mean
- returns
a stable map
- def nextMapSupport(m: Map[Int, Double], support: Set[Int]): (Map[Int, Double], Set[Int], Boolean)
The next step towards a stable map with given equations
The next step towards a stable map with given equations
- m
the map so far
- support
the set of indices where we should recompute
- returns
triple of the next map, next support and whether stable
- def nextTraceSet(current: Set[Set[Int]], relativeTo: Set[Int]): Set[Set[Int]]
- Definition Classes
- ExpressionEquationIndexifier
- def nextTraceVector(current: Vector[Vector[Int]]): Vector[Vector[Int]]
- Definition Classes
- ExpressionEquationIndexifier
- def normalizedMapBounded(v: Map[Int, Double], w: Map[Int, Double]): Boolean
- val numVars: Int
- Definition Classes
- ExpressionEquationIndexifier
- def orthonormalGradients(v: ParSeq[Double], cutoff: Double = 0.0): ParVector[ParVector[Double]]
- Definition Classes
- ExpressionEquationIndexifier
- def proofData(typ: Typ[Term]): Vector[(Int, Equation)]
- Definition Classes
- ExpressionEquationIndexifier
- lazy val randomVarIndices: ParVector[Vector[Int]]
- Definition Classes
- ExpressionEquationIndexifier
- def ratioBounded(v: Vector[Double], w: Vector[Double], bound: Double = maxRatio): Boolean
- final def recTraceSet(current: Set[Set[Int]], depth: Int, relativeTo: Set[Int], accum: Set[Set[Int]]): Set[Set[Int]]
- Definition Classes
- ExpressionEquationIndexifier
- Annotations
- @tailrec()
- def restrictMap(m: Map[Int, Double], indices: Vector[Int]): Vector[Double]
- lazy val rhsExprs: Vector[SumIndexExpression]
- Definition Classes
- ExpressionEquationIndexifier
- lazy val rhsExprsPar: ParVector[SumIndexExpression]
- Definition Classes
- ExpressionEquationIndexifier
- def rhsInvolves(js: Set[Int]): Set[Int]
- Definition Classes
- ExpressionEquationIndexifier
- def simplify(exp: Expression): SumIndexExpression
- Definition Classes
- ExpressionEquationIndexifier
- lazy val size: Int
- Definition Classes
- ExpressionEquationIndexifier
- final def stableMap(initMap: Map[Int, Double], support: Set[Int], exponent: Double = 0.5, decay: Double, maxTime: Option[Long], steps: Long): Map[Int, Double]
- Annotations
- @tailrec()
- final def stableSupportMap(initMap: Map[Int, Double], initSupport: Set[Int], maxTime: Option[Long], steps: Long): (Map[Int, Double], Set[Int])
- Annotations
- @tailrec()
- lazy val startingMap: Map[Int, Double]
- lazy val startingSupport: Set[Int]
- lazy val termIndexVec: Vector[(Term, Int)]
- Definition Classes
- ExpressionEquationIndexifier
- lazy val termIndices: Vector[Int]
- Definition Classes
- ExpressionEquationIndexifier
- lazy val thmPfIndices: Map[Int, Vector[Int]]
- Definition Classes
- ExpressionEquationIndexifier
- lazy val totalProbEquations: ParVector[ParVector[Double]]
- Definition Classes
- ExpressionEquationIndexifier
- def traceIndices(j: Int, depth: Int): Vector[Int]
- Definition Classes
- ExpressionEquationIndexifier
- def traceSet(elem: Expression, depth: Int, relativeTo: Set[Int]): Set[Set[Int]]
- Definition Classes
- ExpressionEquationIndexifier
- lazy val typIndexVec: Vector[(Typ[Term], Int)]
- Definition Classes
- ExpressionEquationIndexifier
- lazy val typIndices: Vector[Int]
- Definition Classes
- ExpressionEquationIndexifier
- lazy val varVec: Vector[Expression]
- Definition Classes
- ExpressionEquationIndexifier