Packages

c

provingground.learning

IndexEquationMapSolver

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.

Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IndexEquationMapSolver
  2. ExpressionEquationIndexifier
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. 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

  1. lazy val constantEquations: Set[Int]
  2. lazy val constantMap: Map[Int, Double]
  3. def equationGradients(v: ParSeq[Double]): ParVector[ParVector[Double]]
  4. val equationVec: Vector[Equation]
  5. lazy val finalDistMap: Map[Expression, Double]
  6. lazy val finalStableMap: Map[Int, Double]
  7. def getProd(exp: Expression): ProductIndexExpression
  8. lazy val indexMap: Map[Expression, Int]
  9. lazy val initPar: ParMap[Expression, Double]
  10. lazy val initTermIndices: Vector[Int]
  11. lazy val initTypIndices: Vector[Int]
  12. def mapToIndexMap[V](m: Map[Expression, V]): Map[Int, V]
  13. 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

  14. 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

  15. def nextTraceSet(current: Set[Set[Int]], relativeTo: Set[Int]): Set[Set[Int]]
  16. def nextTraceVector(current: Vector[Vector[Int]]): Vector[Vector[Int]]
  17. def normalizedMapBounded(v: Map[Int, Double], w: Map[Int, Double]): Boolean
  18. val numVars: Int
  19. def orthonormalGradients(v: ParSeq[Double], cutoff: Double = 0.0): ParVector[ParVector[Double]]
  20. def proofData(typ: Typ[Term]): Vector[(Int, Equation)]
  21. lazy val randomVarIndices: ParVector[Vector[Int]]
  22. def ratioBounded(v: Vector[Double], w: Vector[Double], bound: Double = maxRatio): Boolean
  23. final def recTraceSet(current: Set[Set[Int]], depth: Int, relativeTo: Set[Int], accum: Set[Set[Int]]): Set[Set[Int]]
    Definition Classes
    ExpressionEquationIndexifier
    Annotations
    @tailrec()
  24. def restrictMap(m: Map[Int, Double], indices: Vector[Int]): Vector[Double]
  25. lazy val rhsExprs: Vector[SumIndexExpression]
  26. lazy val rhsExprsPar: ParVector[SumIndexExpression]
  27. def rhsInvolves(js: Set[Int]): Set[Int]
  28. def simplify(exp: Expression): SumIndexExpression
  29. lazy val size: Int
  30. 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()
  31. final def stableSupportMap(initMap: Map[Int, Double], initSupport: Set[Int], maxTime: Option[Long], steps: Long): (Map[Int, Double], Set[Int])
    Annotations
    @tailrec()
  32. lazy val startingMap: Map[Int, Double]
  33. lazy val startingSupport: Set[Int]
  34. lazy val termIndexVec: Vector[(Term, Int)]
  35. lazy val termIndices: Vector[Int]
  36. lazy val thmPfIndices: Map[Int, Vector[Int]]
  37. lazy val totalProbEquations: ParVector[ParVector[Double]]
  38. def traceIndices(j: Int, depth: Int): Vector[Int]
  39. def traceSet(elem: Expression, depth: Int, relativeTo: Set[Int]): Set[Set[Int]]
  40. lazy val typIndexVec: Vector[(Typ[Term], Int)]
  41. lazy val typIndices: Vector[Int]
  42. lazy val varVec: Vector[Expression]