Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
0ccacce
add pplite bsa file
ComboProblem Aug 8, 2025
8f4ed88
Merge branch 'mkoeppe:master' into PPlite_BSA
ComboProblem Aug 8, 2025
257832e
calcuate slopes in common field of breakpoints and values
ComboProblem Aug 14, 2025
32a4069
start of minimal functions cashe
ComboProblem Aug 14, 2025
4648c62
add _partial_eval method to ParametricRealField
ComboProblem Aug 22, 2025
dbdfb61
update doc to design goals for partial test points
ComboProblem Aug 22, 2025
e47fcd5
change assume_comparison to support partial evaluations
ComboProblem Aug 22, 2025
44cf014
fix syntax
ComboProblem Aug 22, 2025
96f0921
move FactorUndetermined to its own file to make it a shared resouce
ComboProblem Aug 22, 2025
6391ecd
Update setup.py
ComboProblem Aug 28, 2025
0df5989
Update setup.py
ComboProblem Aug 28, 2025
387f177
inprogress
ComboProblem Aug 28, 2025
56baa49
working partial test point more, next step fix doc string tests
ComboProblem Aug 30, 2025
921178f
finish comments; clean up tests.
ComboProblem Aug 30, 2025
81d9b6c
remove some comments
ComboProblem Aug 30, 2025
3a07743
Merge pull request #1 from ComboProblem/partial_test_point_impl
ComboProblem Aug 30, 2025
b6fa203
Merge pull request #2 from ComboProblem/minimal_function_cashe
ComboProblem Aug 30, 2025
dfb4de4
Merge pull request #3 from ComboProblem/PPlite_BSA
ComboProblem Aug 30, 2025
a9536d0
remove setuptools test
ComboProblem Sep 26, 2025
7c967d1
Merge branch 'mkoeppe:master' into MinimalFunctionCasheFull
ComboProblem Sep 29, 2025
cf4b10b
fix spelling of cache in file name; add minimal_function_cashe to loa…
ComboProblem Sep 29, 2025
e187f24
move polyhedra backedn to parametric.sage
ComboProblem Sep 29, 2025
ab3871a
change backend to parametric real field
ComboProblem Sep 29, 2025
49bdd71
fix comparision
ComboProblem Sep 29, 2025
1440aaf
fixes into full testing branch
ComboProblem Sep 29, 2025
219e70f
Merge branch 'mkoeppe:master' into partial_test_point_impl
ComboProblem Sep 29, 2025
1b68645
finish fixing tests
ComboProblem Sep 30, 2025
d27845a
linting
ComboProblem Sep 30, 2025
bd95f50
spelling fixes
ComboProblem Sep 30, 2025
f27eb4d
Merge branch 'MinimalFunctionCasheFull' into partial_test_point_impl
ComboProblem Sep 30, 2025
1beecf2
update partial test point impl
ComboProblem Sep 30, 2025
d169bea
Merge branch 'mkoeppe:master' into minimal_function_cashe
ComboProblem Sep 30, 2025
f2a1401
Merge branch 'MinimalFunctionCasheFull' into minimal_function_cashe
ComboProblem Sep 30, 2025
92869e0
Merge pull request #6 from ComboProblem/minimal_function_cashe
ComboProblem Sep 30, 2025
29ae8eb
finish fixing tests
ComboProblem Sep 30, 2025
a9cf7cc
linting
ComboProblem Sep 30, 2025
b2aef97
spelling fixes
ComboProblem Sep 30, 2025
4f19888
minor fixes
ComboProblem Sep 30, 2025
fc8a062
Merge branch 'minimal_function_cashe' into partial_test_point_impl
ComboProblem Sep 30, 2025
327f705
merge updated partial test point implementation
ComboProblem Sep 30, 2025
886399a
Merge pull request #8 from ComboProblem/minimal_function_cashe
ComboProblem Sep 30, 2025
3c8ba06
fix
ComboProblem Oct 1, 2025
663b77a
fixed min_fun_cashe
ComboProblem Oct 7, 2025
bc3a335
fix in writing output for bkpt container
ComboProblem Oct 8, 2025
acf4407
outputfile_name_fix
ComboProblem Oct 8, 2025
b96b3fa
more file writing fixes
ComboProblem Oct 8, 2025
a8ddf95
wip
ComboProblem Oct 16, 2025
c293381
wip pt 2
ComboProblem Oct 16, 2025
3dc4868
wip pt3
ComboProblem Oct 16, 2025
3f3c514
wip pt4
ComboProblem Oct 16, 2025
4bdea7a
fix nnc poly from bkpt
ComboProblem Nov 25, 2025
3daa98c
update value polys, bkpt gen, and rep elem gen
ComboProblem Jan 16, 2026
eec2deb
update value ploy, num params
ComboProblem Jan 30, 2026
86b91dd
add some more documenation, sketch method of refining breakpoint space
ComboProblem Feb 5, 2026
aa1970a
finish minimal documantion, fix value poly bug
ComboProblem Feb 6, 2026
9051140
start logging changes
ComboProblem Feb 8, 2026
fb47299
minimal necessary doc tests completed.
ComboProblem Feb 17, 2026
8f2d608
Merge branch 'MinFunStable' into MinFun
ComboProblem Feb 19, 2026
84fdc29
Merge pull request #9 from ComboProblem/MinFun
ComboProblem Feb 19, 2026
cf11adf
add additional doc test, add in pplite backend support
ComboProblem Mar 3, 2026
17bfd37
Merge remote into local.
ComboProblem Mar 3, 2026
2ccd6d3
fix imports
ComboProblem Mar 3, 2026
ac8daf7
finish adding support to pplite backend; some spelling fixes.
ComboProblem Mar 4, 2026
56bd618
finished with pplite addition
ComboProblem Mar 5, 2026
b2b612d
add note for future self
ComboProblem Mar 6, 2026
f1f333f
update loading methods for future existance of function cache, rename…
ComboProblem Mar 24, 2026
897de15
remove minimal_function_cache.sage
ComboProblem Mar 24, 2026
5cc8513
remove depericated imports, order imports
ComboProblem Mar 24, 2026
e1c5f3d
cache loading tested
ComboProblems Mar 31, 2026
300e8d9
Merge pull request #10 from ComboProblem/cut_dev
ComboProblem Mar 31, 2026
45c90ea
make pplite signature consistent with ppl
ComboProblems Mar 31, 2026
a4c1027
fixes in writing files
ComboProblems Mar 31, 2026
adc2aed
Merge branch 'MinFunStable' into Removing-SetupTools
ComboProblem Apr 2, 2026
7d90340
Merge pull request #11 from ComboProblem/Removing-SetupTools
ComboProblem Apr 2, 2026
d8c43a5
finish fixing loading
ComboProblems Apr 2, 2026
0ffc18a
Merge pull request #12 from ComboProblem/cut_dev
ComboProblem Apr 2, 2026
ef628b9
finalize loading styles
ComboProblems Apr 7, 2026
0a182fb
Merge branch 'mkoeppe:master' into cut_dev
ComboProblem Apr 7, 2026
9295386
Merge pull request #13 from ComboProblem/cut_dev
ComboProblem Apr 8, 2026
8f5f5ce
fix paths
ComboProblem Apr 9, 2026
84544bb
fix logic error in loading methods of bkpt and pi min containers
ComboProblems Apr 9, 2026
794fa64
correct input value for cache loader
ComboProblem Apr 10, 2026
bde5373
first pass proof reading
ComboProblem Apr 10, 2026
946ac7c
add plotting diagrams to illustrate adding a breakpoint to a complex
ComboProblem Apr 14, 2026
fc2a994
relocate FactorUndetermined to spam
ComboProblem Apr 14, 2026
1560108
finish linting
ComboProblem Apr 14, 2026
1d589c1
fix imports
ComboProblem Apr 20, 2026
11657f2
minor updates
ComboProblem May 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cutgeneratingfunctionology/igp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ def igp_load(fpath):
igp_load(igp_dir + "plot_options.sage")
igp_load(igp_dir + "faster_subadditivity_test.sage")
igp_load(igp_dir + "faster_subadditivity_test_discontinuous.sage")
igp_load(igp_dir + "minimal_function_cell_description.sage")

from . import extreme_functions, procedures

try:
igp_load(igp_dir + "config.sage")
except IOError:
Expand Down
15 changes: 10 additions & 5 deletions cutgeneratingfunctionology/igp/functions.sage
Original file line number Diff line number Diff line change
Expand Up @@ -1517,9 +1517,15 @@ def piecewise_function_from_breakpoints_slopes_and_values(bkpt, slopes, values,
if field is None:
field = default_field
# global symb_values
symb_values = bkpt + slopes + values
field_values = nice_field_values(symb_values, field)
bkpt, slopes, values = field_values[0:len(bkpt)], field_values[len(bkpt):len(bkpt)+len(slopes)], field_values[-len(values):]
if slopes is None: # make order assumptions in these functions, remove != when possible.
symb_values = bkpt + values
field_values = nice_field_values(symb_values, field)
bkpt, values = field_values[0:len(bkpt)], field_values[-len(values):]
slopes = [(values[i+1]-values[i])/(bkpt[i+1]-bkpt[i]) if bkpt[i+1] > bkpt[i] else 0 for i in range(len(bkpt)-1)]
else:
symb_values = bkpt + slopes + values
field_values = nice_field_values(symb_values, field)
bkpt, slopes, values = field_values[0:len(bkpt)], field_values[len(bkpt):len(bkpt)+len(slopes)], field_values[-len(values):]
intercepts = [ values[i] - slopes[i]*bkpt[i] for i in range(len(slopes)) ]
# Make numbers nice
## slopes = [ canonicalize_number(slope) for slope in slopes ]
Expand Down Expand Up @@ -1550,8 +1556,7 @@ def piecewise_function_from_breakpoints_and_values(bkpt, values, field=None, mer
"""
if len(bkpt)!=len(values):
raise ValueError("Need to have the same number of breakpoints and values.")
slopes = [ (values[i+1]-values[i])/(bkpt[i+1]-bkpt[i]) if bkpt[i+1] != bkpt[i] else 0 for i in range(len(bkpt)-1) ]
return piecewise_function_from_breakpoints_slopes_and_values(bkpt, slopes, values, field, merge=merge)
return piecewise_function_from_breakpoints_slopes_and_values(bkpt, None, values, field, merge=merge)

def piecewise_function_from_breakpoints_and_slopes(bkpt, slopes, field=None, merge=True):
r"""
Expand Down
872 changes: 872 additions & 0 deletions cutgeneratingfunctionology/igp/minimal_function_cell_description.sage

Large diffs are not rendered by default.

188 changes: 110 additions & 78 deletions cutgeneratingfunctionology/igp/parametric.sage

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions cutgeneratingfunctionology/spam/EvaluationExceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class FactorUndetermined(Exception): # FactorUndetermined is raised when an expression can not be evaluated with a test point.
pass
15 changes: 13 additions & 2 deletions cutgeneratingfunctionology/spam/basic_semialgebraic.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
from sage.structure.sage_object import SageObject
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing

class EmptyBSA(Exception):
pass

def _bsa_class(bsa_class):
r"""
Translate a class nickname to a class.
Expand Down Expand Up @@ -1070,8 +1073,8 @@ def __contains__(self, point):
# override the abstract methods
def find_point(self):
r"""
Find a point in ``self``.

Find a point in ``self``.
EXAMPLES::

sage: from cutgeneratingfunctionology.spam.basic_semialgebraic import *
Expand All @@ -1081,6 +1084,12 @@ def find_point(self):
sage: P.add_linear_constraint([2,3],-6,operator.lt)
sage: P.find_point()
(11/10, 11/15)
sage: P = BasicSemialgebraicSet_polyhedral_ppl_NNC_Polyhedron(1)
sage: P.add_linear_constraint([1],0,operator.ge)
sage: P.add_linear_constraint([1],-1,operator.lt)
sage: P.find_point()
EmptyBSA

"""
def to_point(g):
den = g.divisor()
Expand All @@ -1091,6 +1100,8 @@ def to_vector(g):
if g.is_point() or g.is_closure_point() ]
rays = [ to_vector(g) for g in self._polyhedron.generators()
if g.is_ray() ]
if self.is_empty():
raise EmptyBSA("The underlying bsa is empty set.")
if points:
p = sum(points) / len(points)
if rays:
Expand Down
Loading