code
stringlengths
114
1.05M
path
stringlengths
3
312
quality_prob
float64
0.5
0.99
learning_prob
float64
0.2
1
filename
stringlengths
3
168
kind
stringclasses
1 value
from sage.schemes.generic.divisor import Divisor_generic, Divisor_curve from sage.structure.formal_sum import FormalSums from sage.structure.unique_representation import UniqueRepresentation from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ def DivisorGroup(scheme, base_ring=None): ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/schemes/generic/divisor_group.py
0.946032
0.412412
divisor_group.py
pypi
from sage.schemes.projective.projective_space import is_ProjectiveSpace, ProjectiveSpace from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial from .quartic_generic import QuarticCurve_generic def QuarticCurve(F, PP=None, check=False): """ Returns the quartic curve defined by the polynomi...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/schemes/plane_quartics/quartic_constructor.py
0.889673
0.500854
quartic_constructor.py
pypi
r""" Symplectic structures The class :class:`SymplecticForm` implements symplectic structures on differentiable manifolds over `\RR`. The derived class :class:`SymplecticFormParal` is devoted to symplectic forms on a parallelizable manifold. AUTHORS: - Tobias Diez (2021) : initial version REFERENCES: - [AM1990]_ -...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/manifolds/differentiable/symplectic_form.py
0.962953
0.640594
symplectic_form.py
pypi
r""" Spheres smoothly embedded in Euclidean Space Let `E^{n+1}` be a Euclidean space of dimension `n+1` and `c \in E^{n+1}`. An `n`-sphere with radius `r` and centered at `c`, usually denoted by `\mathbb{S}^n_r(c)`, smoothly embedded in the Euclidean space `E^{n+1}` is an `n`-dimensional smooth manifold together with ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/manifolds/differentiable/examples/sphere.py
0.958789
0.965544
sphere.py
pypi
from sage.plot.primitive import GraphicPrimitive from sage.plot.plot import minmax_data, Graphics from sage.misc.decorators import options class Histogram(GraphicPrimitive): """ Graphics primitive that represents a histogram. This takes quite a few options as well. EXAMPLES:: sage: from sag...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/histogram.py
0.853455
0.649933
histogram.py
pypi
from sage.plot.bezier_path import BezierPath from sage.plot.circle import circle from sage.misc.decorators import options, rename_keyword from sage.rings.cc import CC from sage.plot.hyperbolic_arc import HyperbolicArcCore class HyperbolicPolygon(HyperbolicArcCore): """ Primitive class for hyperbolic polygon ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/hyperbolic_polygon.py
0.919854
0.600628
hyperbolic_polygon.py
pypi
from sage.plot.primitive import GraphicPrimitive from sage.misc.decorators import options, rename_keyword from sage.plot.colors import to_mpl_color from math import sin, cos, pi class Disk(GraphicPrimitive): """ Primitive class for the ``Disk`` graphics type. See ``disk?`` for information about actually...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/disk.py
0.929095
0.552841
disk.py
pypi
from sage.plot.primitive import GraphicPrimitive from sage.misc.decorators import options from sage.plot.colors import get_cmap from sage.arith.srange import xsrange class DensityPlot(GraphicPrimitive): """ Primitive class for the density plot graphics type. See ``density_plot?`` for help actually doing ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/density_plot.py
0.947198
0.716801
density_plot.py
pypi
from .primitive import GraphicPrimitive from sage.misc.decorators import options, rename_keyword from sage.plot.colors import to_mpl_color from math import sin, cos, pi class Circle(GraphicPrimitive): """ Primitive class for the Circle graphics type. See circle? for information about actually plotting ci...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/circle.py
0.928368
0.519156
circle.py
pypi
from sage.plot.line import line def plot_step_function(v, vertical_lines=True, **kwds): r""" Return the line graphics object that gives the plot of the step function `f` defined by the list `v` of pairs `(a,b)`. Here if `(a,b)` is in `v`, then `f(a) = b`. The user does not have to worry about so...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/step.py
0.797044
0.590159
step.py
pypi
from sage.ext.fast_callable import FastCallableFloatWrapper from collections.abc import Iterable def setup_for_eval_on_grid(funcs, ranges, plot_points=None, return_vars=False, imaginary_tolerance=1e-8): r""...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/misc.py
0.884611
0.536434
misc.py
pypi
from sage.plot.primitive import GraphicPrimitive from sage.misc.decorators import options from sage.arith.srange import xsrange # Below is the base class that is used to make 'field plots'. # Its implementation is motivated by 'PlotField'. # Currently it is used to make the functions 'plot_vector_field' # and 'plot_sl...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/plot_field.py
0.708616
0.603844
plot_field.py
pypi
from .primitive import GraphicPrimitive from sage.misc.decorators import options, rename_keyword from sage.plot.colors import to_mpl_color from math import sin, cos, sqrt, pi, fmod class Ellipse(GraphicPrimitive): """ Primitive class for the ``Ellipse`` graphics type. See ``ellipse?`` for information ab...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/ellipse.py
0.958363
0.578359
ellipse.py
pypi
from sage.plot.primitive import GraphicPrimitive from sage.misc.decorators import options, rename_keyword from sage.plot.colors import to_mpl_color class CurveArrow(GraphicPrimitive): def __init__(self, path, options): """ Returns an arrow graphics primitive along the provided path (bezier curve)....
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/arrow.py
0.906439
0.468669
arrow.py
pypi
from sage.plot.primitive import GraphicPrimitive from sage.plot.colors import to_mpl_color from sage.misc.decorators import options, rename_keyword from math import fmod, sin, cos, pi, atan class Arc(GraphicPrimitive): """ Primitive class for the Arc graphics type. See ``arc?`` for information about a...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/arc.py
0.949891
0.639173
arc.py
pypi
from sage.plot.primitive import GraphicPrimitive from sage.misc.decorators import options from sage.arith.srange import xsrange class StreamlinePlot(GraphicPrimitive): """ Primitive class that initializes the StreamlinePlot graphics type """ def __init__(self, xpos_array, ypos_array, xvec_array, yvec_...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/streamline_plot.py
0.952695
0.72323
streamline_plot.py
pypi
import operator from sage.plot.primitive import GraphicPrimitive from sage.misc.decorators import options, suboptions from sage.plot.colors import rgbcolor, get_cmap from sage.arith.srange import xsrange class ContourPlot(GraphicPrimitive): """ Primitive class for the contour plot graphics type. See ``co...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/contour_plot.py
0.892451
0.550245
contour_plot.py
pypi
from sage.plot.primitive import GraphicPrimitive from sage.misc.decorators import options, rename_keyword from sage.plot.colors import to_mpl_color class Text(GraphicPrimitive): """ Base class for Text graphics primitive. TESTS: We test creating some text:: sage: text("I like Fibonacci",(3,...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/text.py
0.825167
0.358943
text.py
pypi
from sage.plot.primitive import GraphicPrimitive from sage.misc.decorators import options class ScatterPlot(GraphicPrimitive): """ Scatter plot graphics primitive. Input consists of two lists/arrays of the same length, whose values give the horizontal and vertical coordinates of each point in the...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/scatter_plot.py
0.944305
0.748697
scatter_plot.py
pypi
from sage.misc.fast_methods import WithEqualityById from sage.structure.sage_object import SageObject from sage.misc.verbose import verbose class GraphicPrimitive(WithEqualityById, SageObject): """ Base class for graphics primitives, e.g., things that knows how to draw themselves in 2D. EXAMPLES: ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/primitive.py
0.790813
0.378115
primitive.py
pypi
from sage.plot.primitive import GraphicPrimitive_xydata from sage.misc.decorators import options, rename_keyword from sage.plot.colors import to_mpl_color class Line(GraphicPrimitive_xydata): """ Primitive class that initializes the line graphics type. EXAMPLES:: sage: from sage.plot.line import...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/line.py
0.885693
0.560674
line.py
pypi
from sage.plot.primitive import GraphicPrimitive_xydata from sage.misc.decorators import options, rename_keyword from sage.plot.colors import to_mpl_color class Polygon(GraphicPrimitive_xydata): """ Primitive class for the Polygon graphics type. For information on actual plotting, please see :func:`poly...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/polygon.py
0.93356
0.647784
polygon.py
pypi
r""" Introduction Sage has a wide support for 3D graphics, from basic shapes to implicit and parametric plots. The following graphics functions are supported: - :func:`~plot3d` - plot a 3d function - :func:`~sage.plot.plot3d.parametric_plot3d.parametric_plot3d` - a parametric three-dimensional space curve or sur...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/plot3d/introduction.py
0.953002
0.930395
introduction.py
pypi
from .parametric_surface import ParametricSurface from .shapes2 import line3d from sage.arith.srange import xsrange, srange from sage.structure.element import is_Vector from sage.misc.decorators import rename_keyword @rename_keyword(alpha='opacity') def parametric_plot3d(f, urange, vrange=None, plot_points="automatic...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/plot3d/parametric_plot3d.py
0.884152
0.564038
parametric_plot3d.py
pypi
from sage.arith.srange import srange from sage.plot.misc import setup_for_eval_on_grid from sage.modules.free_module_element import vector from sage.plot.plot import plot def plot_vector_field3d(functions, xrange, yrange, zrange, plot_points=5, colors='jet', center_arrows=False, **kwds): ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/plot3d/plot_field3d.py
0.864067
0.652408
plot_field3d.py
pypi
r""" Texture support This module provides texture/material support for 3D Graphics objects and plotting. This is a very rough common interface for Tachyon, x3d, and obj (mtl). See :class:`Texture <sage.plot.plot3d.texture.Texture>` for full details about options and use. Initially, we have no textures set:: s...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/plot3d/texture.py
0.893849
0.691413
texture.py
pypi
from .implicit_surface import ImplicitSurface def implicit_plot3d(f, xrange, yrange, zrange, **kwds): r""" Plot an isosurface of a function. INPUT: - ``f`` -- function - ``xrange`` -- a 2-tuple (x_min, x_max) or a 3-tuple (x, x_min, x_max) - ``yrange`` -- a 2-tuple (y_min, y_max) or a 3...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/plot/plot3d/implicit_plot3d.py
0.918274
0.799677
implicit_plot3d.py
pypi
r""" Matrices over an arbitrary ring AUTHORS: - William Stein - Martin Albrecht: conversion to Pyrex - Jaap Spies: various functions - Gary Zablackis: fixed a sign bug in generic determinant. - William Stein and Robert Bradshaw - complete restructuring. - Rob Beezer - refactor kernel functions. Elements of matr...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/matrix/docs.py
0.895027
0.884639
docs.py
pypi
import sage.rings.rational_field def berlekamp_massey(a): r""" Use the Berlekamp-Massey algorithm to find the minimal polynomial of a linear recurrence sequence `a`. The minimal polynomial of a linear recurrence `\{a_r\}` is by definition the unique monic polynomial `g`, such that if `\{a_r\...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/matrix/berlekamp_massey.py
0.710126
0.674865
berlekamp_massey.py
pypi
from sage.categories.fields import Fields _Fields = Fields() def row_iterator(A): for i in range(A.nrows()): yield A.row(i) def prm_mul(p1, p2, mask_free, prec): """ Return the product of ``p1`` and ``p2``, putting free variables in ``mask_free`` to `1`. This function is mainly use as ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/matrix/matrix_misc.py
0.866627
0.711105
matrix_misc.py
pypi
r""" Work with WAV files A WAV file is a header specifying format information, followed by a sequence of bytes, representing the state of some audio signal over a length of time. A WAV file may have any number of channels. Typically, they have 1 (mono) or 2 (for stereo). The data of a WAV file is given as a sequence ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/media/wav.py
0.922509
0.573678
wav.py
pypi
from sage.rings.integer_ring import ZZ from .set import Set_generic from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets from sage.arith.misc import nth_prime from sage.structure.unique_representation import UniqueRepresentation class Primes(Set_generic, UniqueRepresentation): """ The s...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/sets/primes.py
0.873714
0.470919
primes.py
pypi
from sage.structure.element import Element from sage.structure.parent import Parent from sage.structure.richcmp import richcmp, rich_to_bool from sage.sets.finite_enumerated_set import FiniteEnumeratedSet from sage.categories.posets import Posets from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/sets/totally_ordered_finite_set.py
0.875528
0.555676
totally_ordered_finite_set.py
pypi
from sage.misc.latex import latex from sage.misc.prandom import choice from sage.misc.cachefunc import cached_method from sage.structure.category_object import CategoryObject from sage.structure.element import Element from sage.structure.parent import Parent, Set_generic from sage.structure.richcmp import richcmp_met...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/sets/set.py
0.850934
0.421492
set.py
pypi
from sage.structure.parent import Parent from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.structure.unique_representation import UniqueRepresentation from sage.sets.finite_enumerated_set import FiniteEnumerated...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/sets/integer_range.py
0.916025
0.649162
integer_range.py
pypi
from sage.sets.integer_range import IntegerRangeInfinite from sage.rings.integer import Integer class PositiveIntegers(IntegerRangeInfinite): r""" The enumerated set of positive integers. To fix the ideas, we mean `\{1, 2, 3, 4, 5, \dots \}`. This class implements the set of positive integers, as an ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/sets/positive_integers.py
0.93175
0.673856
positive_integers.py
pypi
from typing import Iterator from sage.categories.map import is_Map from sage.categories.poor_man_map import PoorManMap from sage.categories.sets_cat import Sets from sage.categories.enumerated_sets import EnumeratedSets from sage.misc.cachefunc import cached_method from sage.rings.infinity import Infinity from sage.r...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/sets/image_set.py
0.895486
0.414662
image_set.py
pypi
r""" Features for testing the presence of Python modules in the Sage library """ from . import PythonModule, StaticFile from .join_feature import JoinFeature class sagemath_doc_html(StaticFile): r""" A :class:`Feature` which describes the presence of the documentation of the Sage library in HTML format. ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/features/sagemath.py
0.893733
0.495911
sagemath.py
pypi
r""" Feature for testing the presence of ``csdp`` """ import os import re import subprocess from . import Executable, FeatureTestResult class CSDP(Executable): r""" A :class:`~sage.features.Feature` which checks for the ``theta`` binary of CSDP. EXAMPLES:: sage: from sage.features.csdp imp...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/features/csdp.py
0.764276
0.471892
csdp.py
pypi
r""" Features for testing the presence of :class:`MixedIntegerLinearProgram` backends """ from . import Feature, PythonModule, FeatureTestResult from .join_feature import JoinFeature class MIPBackend(Feature): r""" A :class:`~sage.features.Feature` describing whether a :class:`MixedIntegerLinearProgram` back...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/features/mip_backends.py
0.89431
0.572454
mip_backends.py
pypi
r""" Features for testing the presence of package systems """ from . import Feature class PackageSystem(Feature): r""" A :class:`Feature` describing a system package manager. EXAMPLES:: sage: from sage.features.pkg_systems import PackageSystem sage: PackageSystem('conda') Feature...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/features/pkg_systems.py
0.830319
0.465509
pkg_systems.py
pypi
r""" Features for testing the presence of various databases """ from . import StaticFile, PythonModule from sage.env import ( CONWAY_POLYNOMIALS_DATA_DIR, CREMONA_MINI_DATA_DIR, CREMONA_LARGE_DATA_DIR, POLYTOPE_DATA_DIR) class DatabaseConwayPolynomials(StaticFile): r""" A :class:`~sage.features....
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/features/databases.py
0.868395
0.528351
databases.py
pypi
r""" Join features """ from . import Feature, FeatureTestResult class JoinFeature(Feature): r""" Join of several :class:`~sage.features.Feature` instances. This creates a new feature as the union of the given features. Typically these are executables of an SPKG. For an example, see :class:`~sage...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/features/join_feature.py
0.875195
0.580352
join_feature.py
pypi
r""" Feature for testing the presence of ``lrslib`` """ import subprocess from . import Executable, FeatureTestResult from .join_feature import JoinFeature class Lrs(Executable): r""" A :class:`~sage.features.Feature` describing the presence of the ``lrs`` binary which comes as a part of ``lrslib``. ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/features/lrs.py
0.837354
0.560583
lrs.py
pypi
r""" Features for testing the presence of ``rubiks`` """ # **************************************************************************** # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either ver...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/features/rubiks.py
0.795102
0.330613
rubiks.py
pypi
r""" Features for testing the presence of various graph generator programs """ import os import subprocess from . import Executable, FeatureTestResult class Plantri(Executable): r""" A :class:`~sage.features.Feature` which checks for the ``plantri`` binary. EXAMPLES:: sage: from sage.features....
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/features/graph_generators.py
0.829803
0.513425
graph_generators.py
pypi
r""" A catalog of normal form games This allows us to construct common games directly:: sage: g = game_theory.normal_form_games.PrisonersDilemma() sage: g Prisoners dilemma - Normal Form Game with the following utilities: ... We can then immediately obtain the Nash equilibrium for this game:: sage: ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/game_theory/catalog_normal_form_games.py
0.848722
0.724566
catalog_normal_form_games.py
pypi
from itertools import permutations, combinations from sage.misc.misc import powerset from sage.rings.integer import Integer from sage.structure.sage_object import SageObject class CooperativeGame(SageObject): r""" An object representing a co-operative game. Primarily used to compute the Shapley value, but...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/game_theory/cooperative_game.py
0.899182
0.676216
cooperative_game.py
pypi
r""" Gabidulin Code This module provides the :class:`~sage.coding.gabidulin.GabidulinCode`, which constructs Gabidulin Codes that are the rank metric equivalent of Reed Solomon codes and are defined as the evaluation codes of degree-restricted skew polynomials. This module also provides :class:`~sage.coding.gabidulin...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/coding/gabidulin_code.py
0.914121
0.791942
gabidulin_code.py
pypi
r""" Database of two-weight codes This module stores a database of two-weight codes. {DB_INDEX} REFERENCE: - [BS2003]_ - [ChenDB]_ - [Koh2007]_ - [Di2000]_ TESTS: Check the data's consistency:: sage: from sage.coding.two_weight_db import data sage: for code in data: ....: M = code['M'] ......
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/coding/two_weight_db.py
0.753376
0.472197
two_weight_db.py
pypi
r""" Access functions to online databases for coding theory """ from sage.libs.gap.libgap import libgap from sage.features.gap import GapPackage # Do not put any global imports here since this module is accessible as # sage.codes.databases.<tab> def best_linear_code_in_guava(n, k, F): r""" Return the linear ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/coding/databases.py
0.916638
0.744494
databases.py
pypi
from sage.modules.free_module_element import vector from sage.matrix.constructor import matrix from sage.matrix.matrix_space import MatrixSpace from sage.rings.function_field.place import FunctionFieldPlace from .linear_code import (AbstractLinearCode, LinearCodeGeneratorMatrixEncoder, ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/coding/ag_code.py
0.887394
0.55923
ag_code.py
pypi
"IntegerFactorization objects" from sage.structure.factorization import Factorization from sage.rings.integer_ring import ZZ class IntegerFactorization(Factorization): """ A lightweight class for an ``IntegerFactorization`` object, inheriting from the more general ``Factorization`` class. In the ``F...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/structure/factorization_integer.py
0.918845
0.720848
factorization_integer.py
pypi
r""" Iterable of the keys of a Mapping associated with nonzero values """ from collections.abc import MappingView, Sequence, Set from sage.misc.superseded import deprecation class SupportView(MappingView, Sequence, Set): r""" Dynamic view of the set of keys of a dictionary that are associated with nonzero v...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/structure/support_view.py
0.913792
0.749087
support_view.py
pypi
import os from sage.misc.temporary_file import tmp_filename from sage.misc.superseded import deprecation from sage.structure.sage_object import SageObject import sage.doctest deprecation(32988, 'the module sage.structure.graphics_file is deprecated') class Mime(): TEXT = 'text/plain' HTML = 'text/html' ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/structure/graphics_file.py
0.558447
0.249242
graphics_file.py
pypi
def arithmetic(t=None): """ Controls the default proof strategy for integer arithmetic algorithms (such as primality testing). INPUT: t -- boolean or ``None`` OUTPUT: If t is ``True``, requires integer arithmetic operations to (by default) return results that are true unconditionally...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/structure/proof/all.py
0.919566
0.865338
all.py
pypi
"Global proof preferences" from sage.structure.sage_object import SageObject class _ProofPref(SageObject): """ An object that holds global proof preferences. For now these are merely True/False flags for various parts of Sage that use probabilistic algorithms. A True flag means that the subsystem (such a...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/structure/proof/proof.py
0.89219
0.614365
proof.py
pypi
import unicodedata from sage.structure.sage_object import SageObject class CompoundSymbol(SageObject): def __init__(self, character, top, extension, bottom, middle=None, middle_top=None, middle_bottom=None, top_2=None, bottom_2=None): """ A multi...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/typeset/symbols.py
0.885179
0.489076
symbols.py
pypi
r""" Catalog of matroids A module containing constructors for several common matroids. A list of all matroids in this module is available via tab completion. Let ``<tab>`` indicate pressing the :kbd:`Tab` key. So begin by typing ``matroids.<tab>`` to see the various constructions available. Many special matroids can ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/matroids/matroids_catalog.py
0.833968
0.861072
matroids_catalog.py
pypi
r""" Rolfsen database of knots with at most 10 crossings. Each entry is indexed by a pair `(n, k)` where `n` is the crossing number and `k` is the index in the table. Knots are described by words in braids groups, more precisely by pairs `(m, w)` where `m` is the number of strands and `w` is a list of indices of gene...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/knots/knot_table.py
0.705075
0.641387
knot_table.py
pypi
r""" Shard intersection order This file builds a combinatorial version of the shard intersection order of type A (in the classification of finite Coxeter groups). This is a lattice on the set of permutations, closely related to noncrossing partitions and the weak order. For technical reasons, the elements of the pose...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/shard_order.py
0.892891
0.734643
shard_order.py
pypi
r""" Combinatorics Introductory material --------------------- - :ref:`sage.combinat.quickref` - :ref:`sage.combinat.tutorial` Thematic indexes ---------------- - :ref:`sage.combinat.algebraic_combinatorics` - :ref:`sage.combinat.chas.all` - :ref:`sage.combinat.cluster_algebra_quiver.all` - :ref:`sage.combin...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/all.py
0.837487
0.643441
all.py
pypi
from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.misc.misc_c import prod from sage.misc.prandom import random, randrange from sage.rings.polynomial.polynomial_ring_constructor...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/derangements.py
0.891274
0.620133
derangements.py
pypi
from sage.structure.unique_representation import UniqueRepresentation from sage.structure.parent import Parent from sage.combinat.partition import Partitions, Partition from sage.combinat.combinat import CombinatorialElement from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.combinat.com...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/core.py
0.907591
0.49585
core.py
pypi
r""" Algebraic combinatorics Thematic tutorials ------------------ - `Algebraic Combinatorics in Sage <../../../../thematic_tutorials/algebraic_combinatorics.html>`_ - `Lie Methods and Related Combinatorics in Sage <../../../../thematic_tutorials/lie.html>`_ - `Linear Programming (Mixed Integer) <../../../../thematic...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/algebraic_combinatorics.py
0.883701
0.702696
algebraic_combinatorics.py
pypi
from sage.matrix.constructor import matrix from sage.rings.integer_ring import ZZ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.structure.sage_object import SageObject def _matrix_display(self, variables=None): """ Return the 2-variable polynomial ``self`` as a matrix ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/triangles_FHM.py
0.920994
0.647074
triangles_FHM.py
pypi
from sage.misc.cachefunc import cached_method from sage.misc.bindable_class import BindableClass from sage.misc.lazy_attribute import lazy_attribute from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation from sage.categories.algebras import Algebras from sage.cat...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/descent_algebra.py
0.898168
0.604924
descent_algebra.py
pypi
r""" Gray codes Functions --------- """ def product(m): r""" Iterator over the switch for the iteration of the product `[m_0] \times [m_1] \ldots \times [m_k]`. The iterator return at each step a pair ``(p,i)`` which corresponds to the modification to perform to get the next element. More precis...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/gray_codes.py
0.847369
0.80456
gray_codes.py
pypi
r""" Catalog Of Crystal Models For `B(\infty)` We currently have the following models: * :class:`AlcovePaths <sage.combinat.crystals.alcove_path.InfinityCrystalOfAlcovePaths>` * :class:`GeneralizedYoungWalls <sage.combinat.crystals.generalized_young_walls.InfinityCrystalOfGeneralizedYoungWalls>` * :class:`LSPaths...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/crystals/catalog_infinity_crystals.py
0.89735
0.541227
catalog_infinity_crystals.py
pypi
from sage.categories.category import Category from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets from sage.sets.family import Family from sage.structure.element_wrapper import ElementWrapper from sage.structure.element import get_coercion_model class DirectSumOfCrystals(DisjointUnionEnu...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/crystals/direct_sum.py
0.894728
0.627637
direct_sum.py
pypi
r""" Catalog Of Crystals Let `I` be an index set and let `(A,\Pi,\Pi^\vee,P,P^\vee)` be a Cartan datum associated with generalized Cartan matrix `A = (a_{ij})_{i,j\in I}`. An *abstract crystal* associated to this Cartan datum is a set `B` together with maps .. MATH:: e_i,f_i \colon B \to B \cup \{0\}, \qquad ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/crystals/catalog.py
0.851675
0.771349
catalog.py
pypi
from sage.structure.parent import Parent from sage.categories.regular_supercrystals import RegularSuperCrystals from sage.combinat.partition import _Partitions from sage.combinat.root_system.cartan_type import CartanType from sage.combinat.crystals.letters import CrystalOfBKKLetters from sage.combinat.crystals.tensor_...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/crystals/bkk_crystals.py
0.893562
0.613497
bkk_crystals.py
pypi
import copy from sage.combinat.combinat import CombinatorialObject from sage.combinat.words.word import Word from sage.combinat.combination import Combinations from sage.combinat.permutation import Permutation from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.rational_field i...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/sf/ns_macdonald.py
0.784236
0.62855
ns_macdonald.py
pypi
from . import sfa, multiplicative, classical from sage.combinat.partition import Partition from sage.arith.all import divisors from sage.rings.infinity import infinity from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.misc.misc_c import prod class SymmetricFunctionAlgebra_power(mu...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/sf/powersum.py
0.895157
0.698124
powersum.py
pypi
from sage.categories.morphism import SetMorphism from sage.categories.homset import Hom from sage.matrix.constructor import matrix import sage.combinat.partition import sage.data_structures.blas_dict as blas from . import classical class SymmetricFunctionAlgebra_dual(classical.SymmetricFunctionAlgebra_classical): ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/sf/dual.py
0.905446
0.720995
dual.py
pypi
from . import sfa from sage.categories.morphism import SetMorphism from sage.categories.homset import Hom class SymmetricFunctionAlgebra_orthotriang(sfa.SymmetricFunctionAlgebra_generic): class Element(sfa.SymmetricFunctionAlgebra_generic.Element): pass def __init__(self, Sym, base, scalar, prefix,...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/sf/orthotriang.py
0.943295
0.583915
orthotriang.py
pypi
from . import sfa import sage.libs.lrcalc.lrcalc as lrcalc from sage.combinat.partition import Partitions from sage.misc.cachefunc import cached_method class SymmetricFunctionAlgebra_orthogonal(sfa.SymmetricFunctionAlgebra_generic): r""" The orthogonal symmetric function basis (or orthogonal basis, to be sho...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/sf/orthogonal.py
0.879755
0.699747
orthogonal.py
pypi
from . import sfa import sage.libs.lrcalc.lrcalc as lrcalc from sage.combinat.partition import Partitions from sage.misc.cachefunc import cached_method class SymmetricFunctionAlgebra_symplectic(sfa.SymmetricFunctionAlgebra_generic): r""" The symplectic symmetric function basis (or symplectic basis, to be sho...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/sf/symplectic.py
0.890247
0.781038
symplectic.py
pypi
from .species import GenericCombinatorialSpecies from sage.arith.misc import factorial from .subset_species import SubsetSpeciesStructure from .set_species import SetSpecies from .structure import GenericSpeciesStructure from sage.combinat.species.misc import accept_size from functools import reduce class PartitionS...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/species/partition_species.py
0.794185
0.466663
partition_species.py
pypi
from .species import GenericCombinatorialSpecies from sage.arith.misc import factorial from .structure import GenericSpeciesStructure from .set_species import SetSpecies from sage.structure.unique_representation import UniqueRepresentation class CharacteristicSpeciesStructure(GenericSpeciesStructure): def __repr...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/species/characteristic_species.py
0.87362
0.401219
characteristic_species.py
pypi
from .set_species import SetSpecies from .partition_species import PartitionSpecies from .subset_species import SubsetSpecies from .recursive_species import CombinatorialSpecies from .characteristic_species import CharacteristicSpecies, SingletonSpecies, EmptySetSpecies from .cycle_species import CycleSpecies from .li...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/species/library.py
0.767254
0.44746
library.py
pypi
from .species import GenericCombinatorialSpecies from .set_species import SetSpecies from .structure import GenericSpeciesStructure from sage.combinat.species.misc import accept_size from sage.structure.unique_representation import UniqueRepresentation from sage.arith.misc import factorial class SubsetSpeciesStructu...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/species/subset_species.py
0.844024
0.42185
subset_species.py
pypi
from .species import GenericCombinatorialSpecies from sage.combinat.species.structure import GenericSpeciesStructure from sage.combinat.species.misc import accept_size from sage.structure.unique_representation import UniqueRepresentation from sage.arith.misc import factorial class SetSpeciesStructure(GenericSpeciesS...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/species/set_species.py
0.870941
0.424412
set_species.py
pypi
from .species import GenericCombinatorialSpecies from .structure import SpeciesStructureWrapper from sage.structure.unique_representation import UniqueRepresentation class SumSpeciesStructure(SpeciesStructureWrapper): pass class SumSpecies(GenericCombinatorialSpecies, UniqueRepresentation): def __init__(sel...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/species/sum_species.py
0.889867
0.497559
sum_species.py
pypi
from .species import GenericCombinatorialSpecies from .structure import GenericSpeciesStructure from sage.structure.unique_representation import UniqueRepresentation from sage.arith.all import divisors, euler_phi from sage.combinat.species.misc import accept_size class CycleSpeciesStructure(GenericSpeciesStructure):...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/species/cycle_species.py
0.839767
0.36676
cycle_species.py
pypi
from .species import GenericCombinatorialSpecies from .structure import GenericSpeciesStructure from sage.structure.unique_representation import UniqueRepresentation from sage.combinat.permutation import Permutation, Permutations from sage.combinat.species.misc import accept_size class PermutationSpeciesStructure(Ge...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/species/permutation_species.py
0.795221
0.456046
permutation_species.py
pypi
from .species import GenericCombinatorialSpecies from sage.structure.unique_representation import UniqueRepresentation class EmptySpecies(GenericCombinatorialSpecies, UniqueRepresentation): """ Returns the empty species. This species has no structure at all. It is the zero of the semi-ring of species. ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/species/empty_species.py
0.61555
0.613237
empty_species.py
pypi
from .species import GenericCombinatorialSpecies from .structure import GenericSpeciesStructure from sage.structure.unique_representation import UniqueRepresentation from sage.combinat.species.misc import accept_size class LinearOrderSpeciesStructure(GenericSpeciesStructure): def canonical_label(self): ""...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/species/linear_order_species.py
0.891634
0.440048
linear_order_species.py
pypi
from sage.combinat.species.species import GenericCombinatorialSpecies from sage.combinat.species.structure import SpeciesStructureWrapper from sage.rings.rational_field import QQ class CombinatorialSpeciesStructure(SpeciesStructureWrapper): pass class CombinatorialSpecies(GenericCombinatorialSpecies): def _...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/species/recursive_species.py
0.755457
0.295481
recursive_species.py
pypi
from .species import GenericCombinatorialSpecies from .structure import GenericSpeciesStructure from .subset_species import SubsetSpecies from sage.structure.unique_representation import UniqueRepresentation class ProductSpeciesStructure(GenericSpeciesStructure): def __init__(self, parent, labels, subset, left, r...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/species/product_species.py
0.854869
0.386242
product_species.py
pypi
from .species import GenericCombinatorialSpecies from .structure import GenericSpeciesStructure class FunctorialCompositionStructure(GenericSpeciesStructure): pass class FunctorialCompositionSpecies(GenericCombinatorialSpecies): def __init__(self, F, G, min=None, max=None, weight=None): """ ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/species/functorial_composition_species.py
0.842345
0.441071
functorial_composition_species.py
pypi
r""" Common combinatorial tools REFERENCES: .. [NCSF] Gelfand, Krob, Lascoux, Leclerc, Retakh, Thibon, *Noncommutative Symmetric Functions*, Adv. Math. 112 (1995), no. 2, 218-348. .. [QSCHUR] Haglund, Luoto, Mason, van Willigenburg, *Quasisymmetric Schur functions*, J. Comb. Theory Ser. A 118 (2011), 463-490. ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/ncsf_qsym/combinatorics.py
0.919482
0.551574
combinatorics.py
pypi
r""" Introduction to Quasisymmetric Functions In this document we briefly explain the quasisymmetric function bases and related functionality in Sage. We assume the reader is familiar with the package :class:`SymmetricFunctions`. Quasisymmetric functions, denoted `QSym`, form a subring of the power series ring in c...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/ncsf_qsym/tutorial.py
0.935619
0.975878
tutorial.py
pypi
# OneExactCover and AllExactCovers are almost exact copies of the # functions with the same name in sage/combinat/dlx.py by Tom Boothby. from .dancing_links import dlx_solver def DLXCPP(rows): """ Solves the Exact Cover problem by using the Dancing Links algorithm described by Knuth. Consider a matr...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/matrices/dlxcpp.py
0.810966
0.837321
dlxcpp.py
pypi
from itertools import repeat from sage.misc.cachefunc import cached_method from sage.misc.misc_c import prod from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation from sage.categories.graded_hopf_algebras import GradedHopfAlgebras from sage.categories.rings impor...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/ncsym/ncsym.py
0.708616
0.595581
ncsym.py
pypi
from sage.misc.lazy_attribute import lazy_attribute from sage.misc.misc_c import prod from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation from sage.categories.graded_hopf_algebras import GradedHopfAlgebras from sage.categories.rings import Rings from sage.cate...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/ncsym/dual.py
0.77535
0.600071
dual.py
pypi
from .cartan_type import CartanType_standard_finite from sage.combinat.root_system.root_system import RootSystem class CartanType(CartanType_standard_finite): """ Cartan Type `Q_n` .. SEEALSO:: :func:`~sage.combinat.root_systems.cartan_type.CartanType` """ def __init__(self, m): """ ...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/root_system/type_Q.py
0.895111
0.571348
type_Q.py
pypi
from sage.misc.cachefunc import cached_method from sage.sets.family import Family from sage.combinat.free_module import CombinatorialFreeModule from .weight_lattice_realizations import WeightLatticeRealizations import functools class WeightSpace(CombinatorialFreeModule): r""" INPUT: - ``root_system`` --...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/root_system/weight_space.py
0.924321
0.743971
weight_space.py
pypi
from .cartan_type import CartanType_standard_finite, CartanType_simple class CartanType(CartanType_standard_finite, CartanType_simple): def __init__(self, n): """ EXAMPLES:: sage: ct = CartanType(['I',5]) sage: ct ['I', 5] sage: ct._repr_(compact =...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/root_system/type_I.py
0.896837
0.613352
type_I.py
pypi
from sage.rings.integer_ring import ZZ from sage.combinat.root_system.root_lattice_realizations import RootLatticeRealizations from . import ambient_space class AmbientSpace(ambient_space.AmbientSpace): r""" EXAMPLES:: sage: R = RootSystem(["A",3]) sage: e = R.ambient_space(); e Ambi...
/sagemath-standard-10.0b0.tar.gz/sagemath-standard-10.0b0/sage/combinat/root_system/type_A.py
0.889
0.54256
type_A.py
pypi