├── .github └── workflows │ └── dist.yml ├── .gitignore ├── AUTHORS ├── CHANGED-INTERFACES ├── COPYING ├── COPYING.LESSER ├── ChangeLog ├── HACKING ├── Makefile.am ├── README.md ├── RELEASE-INSTRUCTIONS ├── autogen.sh ├── benchmarks ├── BenchmarkFile.h ├── BenchmarkFile.inl ├── CSValue.h ├── Makefile.am ├── README ├── benchmark-dense-solve.C ├── benchmark-example.C ├── benchmark-fft.C ├── benchmark-metadata.C ├── benchmark-metadata.h ├── benchmark-order-basis.C ├── benchmark-polynomial-matrix-mul-fft.C ├── benchmark-solve-cra.C ├── benchmark-utils.C ├── benchmark-utils.h ├── benchmark.C ├── benchmark.doxy ├── benchmark.h ├── benchmark.inl ├── block-coppersmith-benchmark.C ├── data │ └── Makefile.am ├── gen-blocks.C ├── invariant-factors-benchmark.C ├── matrix │ ├── Makefile.am │ ├── bibd_12_5_66x792.sms │ ├── bibd_12_5_66x792.sms.gz │ ├── bibd_13_6_78x1716.sms │ ├── bibd_13_6_78x1716.sms.gz │ ├── bibd_14_7_91x3432.sms │ └── bibd_14_7_91x3432.sms.gz ├── omp-benchmark.C ├── optimizer.h └── perfpublisher.sh ├── configure.ac ├── doc ├── Doxyfile.mod ├── DoxyfileDev.mod ├── Makefile.am ├── doc.doxy ├── index-dev.html ├── install-1.0.html ├── install-dev.html ├── install-dist.html ├── linbox-config.1 ├── linbox.html ├── mainpage.doxy ├── organization │ ├── Linbox.draft │ └── Makefile.am ├── tex │ └── Makefile.am ├── tutorial.doxy └── versionning.doxy ├── docker-auto.run ├── examples ├── Makefile.am ├── Readme ├── Readme-make.in ├── attic │ ├── athadet.C │ ├── bench-matpoly-mult.C │ ├── bigmat.C │ ├── find-invariant-factors.C │ ├── gf3-invariant-factors.C │ ├── givaro-poly-local.C │ ├── grid_reduce.C │ ├── iliopoulos2.C │ ├── integer-mul.C │ ├── invariant-factors.C │ ├── map-sparse-test.C │ ├── map-sparse.h │ ├── map-sparse.inl │ ├── nullspacebasis_rank.C │ ├── omp_block_rank.C │ ├── poly-smith.C │ ├── qchar.C │ ├── rr.C │ ├── samplebb.C │ ├── smith-form-kb.C │ ├── smith-form-local.C │ └── test-triplesbb-omp.C ├── blassolve.C ├── charpoly.C ├── checksolve.C ├── data │ ├── Makefile.am │ ├── lowmat.sms │ ├── mat.txt │ ├── mat2.txt │ ├── symmat.sms │ ├── wikivote │ └── zeromat.sms ├── densesolverat.C ├── det.C ├── dixonsolve.C ├── dot-product.C ├── doubledet.C ├── echelon.C ├── examples.doxy ├── genprime.C ├── graph-charpoly.C ├── makefile.mpi ├── matrices.C ├── matrices.h ├── minpoly.C ├── mpidet.C ├── nullspacebasis.C ├── nullspacebasis_rat.C ├── power_rank.C ├── poweroftwo_ranks.C ├── rank.C ├── ratdet.C ├── smith.C ├── smithsparse.C ├── smithvalence.C ├── solve.C ├── solver │ ├── Makefile.am │ └── t-rdisolve.C ├── sparseelimdet.C ├── sparseelimrank.C ├── sparsesolverat.C └── valence.C ├── incremente-versions ├── interfaces ├── Makefile.am ├── driver │ ├── Makefile.am │ ├── compile-readme.txt │ ├── lb-blackbox-abstract.h │ ├── lb-blackbox-collection.h │ ├── lb-blackbox-data.h │ ├── lb-blackbox-function.h │ ├── lb-blackbox-functor.h │ ├── lb-blackbox-type.h │ ├── lb-blackbox.C │ ├── lb-blackbox.h │ ├── lb-charpoly.C │ ├── lb-charpoly.h │ ├── lb-det.C │ ├── lb-det.h │ ├── lb-domain-abstract.h │ ├── lb-domain-collection.h │ ├── lb-domain-data.h │ ├── lb-domain-function.h │ ├── lb-domain-functor.h │ ├── lb-domain-type.h │ ├── lb-domain.C │ ├── lb-domain.h │ ├── lb-driver.h │ ├── lb-element-abstract.h │ ├── lb-element-collection.h │ ├── lb-element-data.h │ ├── lb-element.C │ ├── lb-element.h │ ├── lb-garbage.C │ ├── lb-garbage.h │ ├── lb-interface.h │ ├── lb-minpoly.C │ ├── lb-minpoly.h │ ├── lb-polynomial.C │ ├── lb-polynomial.h │ ├── lb-rank.C │ ├── lb-rank.h │ ├── lb-solve.C │ ├── lb-solve.h │ ├── lb-utilities.h │ ├── lb-vector-abstract.h │ ├── lb-vector-collection.h │ ├── lb-vector-data.h │ ├── lb-vector-function.h │ ├── lb-vector-functor.h │ ├── lb-vector-type.h │ ├── lb-vector.C │ └── lb-vector.h ├── kaapi │ ├── Makefile.am │ └── communicate.h ├── maple-old │ ├── Makefile.am │ ├── Makefile.in.1 │ ├── Makefile.in.2 │ ├── README │ ├── demonstration.mws │ ├── lbffpack.mpl │ ├── lbmaple-ffpack.C │ ├── lbmaple.C │ ├── lbmaple.mpl.head │ └── lbmaple.mpl.tail └── maple │ ├── Makefile.am │ ├── lb-maple-path.pl │ ├── lb-maple-path.sh │ ├── lb-maple-utilities.h │ ├── lb-maple.C │ ├── lb-maple.h │ ├── lb-maple.mpl.bak │ ├── linbox-demonstration-good.mw │ └── linbox-demonstration.mw ├── linbox-auto-install.sh ├── linbox-config.in ├── linbox.pc.in ├── linbox ├── Makefile.am ├── algorithms │ ├── Makefile.am │ ├── algorithms.doxy │ ├── alt-blackbox-block-container.h │ ├── bbcharpoly.h │ ├── bitonic-sort.h │ ├── blackbox-block-container-base.h │ ├── blackbox-block-container.h │ ├── blackbox-container-base.h │ ├── blackbox-container-symmetric.h │ ├── blackbox-container-symmetrize.h │ ├── blackbox-container.h │ ├── block-coppersmith-domain.h │ ├── block-lanczos.h │ ├── block-lanczos.inl │ ├── block-massey-domain.h │ ├── block-wiedemann.h │ ├── charpoly-rational.h │ ├── cia.h │ ├── classic-rational-reconstruction.h │ ├── coppersmith-invariant-factors.h │ ├── coppersmith.h │ ├── cra-builder-early-multip.h │ ├── cra-builder-full-multip-fixed.h │ ├── cra-builder-full-multip.h │ ├── cra-builder-single.h │ ├── cra-builder-var-prec-early-multip.h │ ├── cra-builder-var-prec-early-single.h │ ├── cra-distributed.h │ ├── cra-domain-parallel.h │ ├── cra-domain-sequential.h │ ├── cra-domain.h │ ├── cra-givrnsfixed.h │ ├── cra-kaapi.h │ ├── cra.doxy │ ├── default.h │ ├── dense-container.h │ ├── dense-nullspace.h │ ├── dense-nullspace.inl │ ├── det-rational.h │ ├── diophantine-solver.C │ ├── diophantine-solver.h │ ├── diophantine-solver.inl │ ├── diophantine.doxy │ ├── dixon-solver │ │ ├── Makefile.am │ │ ├── dixon-solver-dense.h │ │ ├── dixon-solver-dense.inl │ │ └── dixon-solver-symbolic-numeric.h │ ├── double-det.h │ ├── dyadic-to-rational.h │ ├── elimination.doxy │ ├── eliminator.h │ ├── eliminator.inl │ ├── fast-rational-reconstruction.h │ ├── frobenius-large.h │ ├── frobenius-small.h │ ├── gauss-gf2.h │ ├── gauss.doxy │ ├── gauss.h │ ├── gauss │ │ ├── Makefile.am │ │ ├── gauss-det-gf2.inl │ │ ├── gauss-det.inl │ │ ├── gauss-elim-gf2.inl │ │ ├── gauss-elim.inl │ │ ├── gauss-gf2.inl │ │ ├── gauss-nullspace.inl │ │ ├── gauss-pivot-gf2.inl │ │ ├── gauss-pivot.inl │ │ ├── gauss-rank-gf2.inl │ │ ├── gauss-rank.inl │ │ ├── gauss-solve-gf2.inl │ │ ├── gauss-solve.inl │ │ └── gauss.inl │ ├── hybrid-det.h │ ├── iml.doxy │ ├── invariant-factors.h │ ├── invert-tb.h │ ├── la-block-lanczos.h │ ├── la-block-lanczos.inl │ ├── lanczos.doxy │ ├── lanczos.h │ ├── lanczos.inl │ ├── last-invariant-factor.h │ ├── lattice.doxy │ ├── lattice.h │ ├── lattice.inl │ ├── lazy-product.h │ ├── lifting-container.h │ ├── massey-domain.h │ ├── matpoly-mult.h │ ├── matrix-blas3 │ │ ├── Makefile.am │ │ ├── blas3.doxy │ │ ├── mul-cra.inl │ │ ├── mul-flint.inl │ │ ├── mul-naive.inl │ │ ├── mul-toomcook.inl │ │ └── mul.h │ ├── matrix-hom.h │ ├── matrix-inverse.h │ ├── mg-block-lanczos.h │ ├── mg-block-lanczos.inl │ ├── minpoly-integer.h │ ├── minpoly-rational.h │ ├── numeric-solver-lapack.h │ ├── one-invariant-factor.h │ ├── opencl-environ.h │ ├── opencl-kernels │ │ ├── Makefile.am │ │ ├── file-list.txt │ │ ├── kernel-axmy-modulus-dp-unroll.cl │ │ ├── kernel-axmy-modulus-dp.cl │ │ ├── kernel-axmy-modulus-sp-unroll.cl │ │ ├── kernel-axmy-modulus-sp.cl │ │ ├── kernel-axmy-partial-1024-dp-unroll.cl │ │ ├── kernel-axmy-partial-1024-dp.cl │ │ ├── kernel-axmy-partial-1024-sp-unroll.cl │ │ ├── kernel-axmy-partial-1024-sp.cl │ │ ├── kernel-axmy-partial-16-sp-unroll.cl │ │ ├── kernel-axmy-partial-16-sp.cl │ │ ├── kernel-axmy-partial-32-dp-unroll.cl │ │ ├── kernel-axmy-partial-32-dp.cl │ │ ├── kernel-axmy-partial-32-sp-unroll.cl │ │ ├── kernel-axmy-partial-32-sp.cl │ │ ├── kernel-axmy-partial-8-dp-unroll.cl │ │ ├── kernel-axmy-partial-8-dp.cl │ │ ├── kernel-axpy-modulus-dp-unroll.cl │ │ ├── kernel-axpy-modulus-dp.cl │ │ ├── kernel-axpy-modulus-sp-unroll.cl │ │ ├── kernel-axpy-modulus-sp.cl │ │ ├── kernel-axpy-partial-1024-dp-unroll.cl │ │ ├── kernel-axpy-partial-1024-dp.cl │ │ ├── kernel-axpy-partial-1024-sp-unroll.cl │ │ ├── kernel-axpy-partial-1024-sp.cl │ │ ├── kernel-axpy-partial-16-sp-unroll.cl │ │ ├── kernel-axpy-partial-16-sp.cl │ │ ├── kernel-axpy-partial-32-dp-unroll.cl │ │ ├── kernel-axpy-partial-32-dp.cl │ │ ├── kernel-axpy-partial-32-sp-unroll.cl │ │ ├── kernel-axpy-partial-32-sp.cl │ │ ├── kernel-axpy-partial-8-dp-unroll.cl │ │ ├── kernel-axpy-partial-8-dp.cl │ │ ├── kernel-maxpy-modulus-dp-unroll.cl │ │ ├── kernel-maxpy-modulus-dp.cl │ │ ├── kernel-maxpy-modulus-sp-unroll.cl │ │ ├── kernel-maxpy-modulus-sp.cl │ │ ├── kernel-maxpy-partial-1024-dp-unroll.cl │ │ ├── kernel-maxpy-partial-1024-dp.cl │ │ ├── kernel-maxpy-partial-1024-sp-unroll.cl │ │ ├── kernel-maxpy-partial-1024-sp.cl │ │ ├── kernel-maxpy-partial-16-sp-unroll.cl │ │ ├── kernel-maxpy-partial-16-sp.cl │ │ ├── kernel-maxpy-partial-32-dp-unroll.cl │ │ ├── kernel-maxpy-partial-32-dp.cl │ │ ├── kernel-maxpy-partial-32-sp-unroll.cl │ │ ├── kernel-maxpy-partial-32-sp.cl │ │ ├── kernel-maxpy-partial-8-dp-unroll.cl │ │ ├── kernel-maxpy-partial-8-dp.cl │ │ ├── kernel-modulus-dp-unroll.cl │ │ ├── kernel-modulus-dp.cl │ │ ├── kernel-modulus-sp-unroll.cl │ │ ├── kernel-modulus-sp.cl │ │ ├── kernel-muladd-modulus-dp-unroll.cl │ │ ├── kernel-muladd-modulus-dp.cl │ │ ├── kernel-muladd-modulus-sp-unroll.cl │ │ ├── kernel-muladd-modulus-sp.cl │ │ ├── kernel-muladd-partial-1024-dp-unroll.cl │ │ ├── kernel-muladd-partial-1024-dp.cl │ │ ├── kernel-muladd-partial-1024-sp-unroll.cl │ │ ├── kernel-muladd-partial-1024-sp.cl │ │ ├── kernel-muladd-partial-16-sp-unroll.cl │ │ ├── kernel-muladd-partial-16-sp.cl │ │ ├── kernel-muladd-partial-32-dp-unroll.cl │ │ ├── kernel-muladd-partial-32-dp.cl │ │ ├── kernel-muladd-partial-32-sp-unroll.cl │ │ ├── kernel-muladd-partial-32-sp.cl │ │ ├── kernel-muladd-partial-8-dp-unroll.cl │ │ ├── kernel-muladd-partial-8-dp.cl │ │ ├── kernel-parser.py │ │ ├── kernel-partial-1024-dp-unroll.cl │ │ ├── kernel-partial-1024-dp.cl │ │ ├── kernel-partial-1024-sp-unroll.cl │ │ ├── kernel-partial-1024-sp.cl │ │ ├── kernel-partial-16-sp-unroll.cl │ │ ├── kernel-partial-16-sp.cl │ │ ├── kernel-partial-32-dp-unroll.cl │ │ ├── kernel-partial-32-dp.cl │ │ ├── kernel-partial-32-sp-unroll.cl │ │ ├── kernel-partial-32-sp.cl │ │ ├── kernel-partial-8-dp-unroll.cl │ │ ├── kernel-partial-8-dp.cl │ │ └── opencl-domain-kernels.inl │ ├── opencl-resource-controller.h │ ├── poly-det.h │ ├── poly-dixon.h │ ├── poly-interpolation.h │ ├── poly-smith-form-local-x.h │ ├── poly-smith-form.h │ ├── polynomial-matrix │ │ ├── Makefile.am │ │ ├── fft-floating.inl │ │ ├── fft-integral.inl │ │ ├── fft-simd.h │ │ ├── fft-utils.h │ │ ├── fft.h │ │ ├── matpoly-add-domain.h │ │ ├── matpoly-mult-fft-multiprecision.inl │ │ ├── matpoly-mult-fft-recint.inl │ │ ├── matpoly-mult-fft-wordsize-fast.inl │ │ ├── matpoly-mult-fft-wordsize-three-primes.inl │ │ ├── matpoly-mult-fft-wordsize.inl │ │ ├── matpoly-mult-fft.h │ │ ├── matpoly-mult-kara.h │ │ ├── matpoly-mult-naive.h │ │ ├── order-basis.h │ │ └── polynomial-matrix-domain.h │ ├── rational-cra-builder-early-multip.h │ ├── rational-cra-builder-early-single.h │ ├── rational-cra-builder-full-multip.h │ ├── rational-cra-var-prec.h │ ├── rational-cra.h │ ├── rational-reconstruction-base.h │ ├── rational-reconstruction.h │ ├── rational-reconstruction2.h │ ├── rational-solver-adaptive.h │ ├── rational-solver-sn.h │ ├── rational-solver-sn.inl │ ├── rational-solver.h │ ├── rational-solver.inl │ ├── rns.h │ ├── rns.inl │ ├── short-vector.h │ ├── sigma-basis.h │ ├── sigmabasis.doxy │ ├── signature.h │ ├── smith-form-adaptive.h │ ├── smith-form-adaptive.inl │ ├── smith-form-binary.h │ ├── smith-form-iliopoulos.h │ ├── smith-form-kannan-bachem.h │ ├── smith-form-local.h │ ├── smith-form-local2.inl │ ├── smith-form-sparseelim-local.h │ ├── smith-form-sparseelim-poweroftwo.h │ ├── smith-form-valence.h │ ├── toeplitz-det.h │ ├── triangular-solve-gf2.h │ ├── triangular-solve.h │ ├── vector-fraction.h │ ├── weak-popov-form.h │ ├── whisart_trace.h │ ├── wiedemann.doxy │ ├── wiedemann.h │ └── wiedemann.inl ├── archetypes.doxy ├── blackbox │ ├── Makefile.am │ ├── apply.h │ ├── archetype.h │ ├── bb.h │ ├── blackbox-interface.h │ ├── blackbox.doxy │ ├── blackbox.h │ ├── block-compose.h │ ├── block-hankel-inverse.h │ ├── block-hankel.h │ ├── block-toeplitz.h │ ├── blockbb.h │ ├── butterfly.h │ ├── butterfly.inl │ ├── companion.h │ ├── compose.h │ ├── csf.h │ ├── csf.inl │ ├── diagonal-gf2.h │ ├── diagonal.h │ ├── dif.h │ ├── direct-sum.h │ ├── factory.h │ ├── fflas-csr.h │ ├── fibb-product.h │ ├── fibb.h │ ├── frobenius.h │ ├── hilbert.h │ ├── inverse.h │ ├── jit-matrix.h │ ├── lambda-sparse.h │ ├── matrix-blackbox.h │ ├── moore-penrose.h │ ├── ntl-hankel.h │ ├── ntl-hankel.inl │ ├── ntl-sylvester.h │ ├── ntl-sylvester.inl │ ├── null-matrix.h │ ├── pascal.h │ ├── permutation.h │ ├── polynomial.h │ ├── quad-matrix.h │ ├── random-matrix-traits.h │ ├── random-matrix.h │ ├── rational-matrix-factory.h │ ├── scalar-matrix.h │ ├── scompose.h │ ├── squarize.h │ ├── submatrix-traits.h │ ├── submatrix.h │ ├── sum.h │ ├── toeplitz.h │ ├── toeplitz.inl │ ├── transpose.h │ ├── triangular-fibb.h │ ├── zero-one.h │ ├── zero-one.inl │ ├── zo-gf2.h │ ├── zo-gf2.inl │ ├── zo.h │ ├── zo.inl │ └── zoi.inl ├── config-blas.h ├── dummy.C ├── element │ ├── Makefile.am │ ├── abstract.h │ ├── archetype.h │ ├── element.doxy │ ├── envelope.h │ └── gmp-rational.h ├── field │ ├── Makefile.am │ ├── abstract.h │ ├── archetype.h │ ├── envelope.h │ ├── field-documentation.h │ ├── field-traits.h │ ├── field.doxy │ ├── gf2.h │ ├── gf2.inl │ ├── gmp-rational.h │ ├── hom.h │ ├── integers.doxy │ ├── map.h │ ├── multimod-field.h │ ├── param-fuzzy.h │ └── rebind.h ├── integer.h ├── iterators │ ├── Makefile.am │ ├── blackbox-symmetric-iterator.h │ └── blackbox-symmetrize-iterator.h ├── linbox-config.h ├── linbox-tags.h ├── linbox.doxy ├── matrix │ ├── Makefile.am │ ├── abnormal-helpers.h │ ├── abnormal-matrix.h │ ├── archetype.h │ ├── dense-matrix.doxy │ ├── dense-matrix.h │ ├── densematrix │ │ ├── Makefile.am │ │ ├── blas-matrix-iterator.h │ │ ├── blas-matrix-multimod.h │ │ ├── blas-matrix.h │ │ ├── blas-matrix.inl │ │ ├── blas-submatrix.h │ │ ├── blas-submatrix.inl │ │ └── blas-transposed-matrix.h │ ├── factorized-matrix.h │ ├── factorized-matrix.inl │ ├── grid.h │ ├── matrix-category.h │ ├── matrix-domain.doxy │ ├── matrix-domain.h │ ├── matrix-iterators.doxy │ ├── matrix-traits.h │ ├── matrix.doxy │ ├── matrixdomain │ │ ├── Makefile.am │ │ ├── blas-matrix-domain-mul.inl │ │ ├── blas-matrix-domain.h │ │ ├── blas-matrix-domain.inl │ │ ├── matrix-domain-gf2.h │ │ ├── matrix-domain.h │ │ ├── matrix-domain.inl │ │ ├── opencl-domain-factory.h │ │ ├── opencl-domain-memory.inl │ │ ├── opencl-domain-util.inl │ │ ├── opencl-domain.h │ │ ├── opencl-domain.inl │ │ └── plain-domain.h │ ├── permutation-matrix.doxy │ ├── permutation-matrix.h │ ├── permutation-matrix.inl │ ├── plain-matrix.h │ ├── polynomial-matrix.h │ ├── random-matrix.h │ ├── random-matrix.inl │ ├── sliced3.doxy │ ├── sliced3.h │ ├── sliced3 │ │ ├── Makefile.am │ │ ├── dense-matrix.h │ │ ├── dense-sliced.h │ │ ├── dense-sliced.inl │ │ ├── sliced-domain.h │ │ ├── sliced-stepper.h │ │ └── submat-iterator.h │ ├── slicedpolynomialmatrix │ │ ├── SlicedPolynomialMatrix.h │ │ ├── SlicedPolynomialMatrix.inl │ │ ├── SlicedPolynomialMatrixAddSub.h │ │ ├── SlicedPolynomialMatrixAddSub.inl │ │ ├── SlicedPolynomialMatrixMulKaratsuba.h │ │ ├── SlicedPolynomialMatrixMulKaratsuba.inl │ │ ├── SlicedPolynomialMatrixMulToomCook.h │ │ ├── SlicedPolynomialMatrixMulToomCook.inl │ │ ├── conversion.h │ │ └── conversion.inl │ ├── sparse-formats.h │ ├── sparse-matrix.doxy │ ├── sparse-matrix.h │ ├── sparsematrix │ │ ├── Makefile.am │ │ ├── read-write-sparse.h │ │ ├── read-write-sparse.inl │ │ ├── sparse-associative-vector.h │ │ ├── sparse-associative-vector.inl │ │ ├── sparse-coo-implicit-matrix.h │ │ ├── sparse-coo-matrix.h │ │ ├── sparse-csr-matrix.h │ │ ├── sparse-domain.h │ │ ├── sparse-ell-matrix.h │ │ ├── sparse-ellr-matrix.h │ │ ├── sparse-generic.h │ │ ├── sparse-generic.inl │ │ ├── sparse-hyb-matrix.h │ │ ├── sparse-map-map-matrix.h │ │ ├── sparse-map-map-matrix.inl │ │ ├── sparse-parallel-vector.h │ │ ├── sparse-parallel-vector.inl │ │ ├── sparse-sequence-vector.h │ │ ├── sparse-sequence-vector.inl │ │ ├── sparse-tpl-matrix-omp.h │ │ ├── sparse-tpl-matrix-omp.inl │ │ ├── sparse-tpl-matrix.h │ │ ├── sparse-tpl-matrix.inl │ │ └── triples-coord.h │ └── transpose-matrix.h ├── polynomial │ ├── Makefile.am │ ├── dense-polynomial.h │ └── polynomial.doxy ├── randiter │ ├── Makefile.am │ ├── abstract.h │ ├── archetype.doxy │ ├── archetype.h │ ├── envelope.h │ ├── generic.h │ ├── gf2.h │ ├── gmp-random-prime.h │ ├── gmp-rational.h │ ├── lidia-gfq.h │ ├── lidia.h │ ├── mersenne-twister.C │ ├── mersenne-twister.h │ ├── modular-balanced.h │ ├── modular-crooked.h │ ├── multimod-randomprime.h │ ├── ntl-zz.h │ ├── param-fuzzy.h │ ├── randiter-wrappers.doxy │ ├── randiter.doxy │ ├── random-fftprime.h │ └── random-prime.h ├── ring │ ├── Makefile.am │ ├── abstract.h │ ├── archetype.h │ ├── envelope.h │ ├── local-pir-modular.h │ ├── local2_32.h │ ├── modular.h │ ├── modular │ │ ├── Makefile.am │ │ ├── modular-balanced-double.h │ │ ├── modular-balanced-float.h │ │ ├── modular-balanced-int32.h │ │ ├── modular-balanced-int64.h │ │ ├── modular-byte.h │ │ ├── modular-double.h │ │ ├── modular-float.h │ │ ├── modular-int32.h │ │ ├── modular-int64.h │ │ ├── modular-short.h │ │ └── modular-unsigned.h │ ├── ntl.doxy │ ├── ntl.h │ ├── ntl │ │ ├── Makefile.am │ │ ├── ntl-gf2e.h │ │ ├── ntl-lzz_p.h │ │ ├── ntl-lzz_pe.h │ │ ├── ntl-lzz_pex.h │ │ ├── ntl-lzz_px.h │ │ ├── ntl-rr.h │ │ ├── ntl-zz.h │ │ ├── ntl-zz_p.h │ │ ├── ntl-zz_pe.h │ │ └── ntl-zz_px.h │ ├── pid-ntl-zz_p.h │ ├── pir-modular-int32.h │ ├── pir-ntl-zz_p.h │ ├── polynomial-local-x.h │ ├── polynomial-ring.h │ ├── polynomial.doxy │ ├── ring-interface.h │ └── ring.doxy ├── solutions │ ├── Makefile.am │ ├── charpoly.doxy │ ├── charpoly.h │ ├── constants.h │ ├── det.h │ ├── determinant.doxy │ ├── echelon.h │ ├── echelon │ │ ├── Makefile.am │ │ ├── echelon-auto.h │ │ └── echelon-dense-elimination.h │ ├── getentry.h │ ├── getentry.inl │ ├── hadamard-bound.h │ ├── is-positive-definite.h │ ├── is-positive-semidefinite.h │ ├── methods.h │ ├── minpoly.doxy │ ├── minpoly.h │ ├── nullspace.doxy │ ├── nullspace.h │ ├── rank.doxy │ ├── rank.h │ ├── rank.inl │ ├── reducedforms.doxy │ ├── smith-form.h │ ├── solution-tags.h │ ├── solutions.doxy │ ├── solve.h │ ├── solve │ │ ├── Makefile.am │ │ ├── solve-auto.h │ │ ├── solve-blackbox.h │ │ ├── solve-cra.h │ │ ├── solve-dense-elimination.h │ │ ├── solve-dixon.h │ │ ├── solve-elimination.h │ │ ├── solve-lanczos.h │ │ ├── solve-numeric-symbolic.h │ │ ├── solve-sparse-elimination.h │ │ └── solve-wiedemann.h │ ├── systemsolving.doxy │ ├── trace.h │ ├── trace.inl │ └── valence.h ├── util │ ├── Makefile.am │ ├── args-parser.h │ ├── commentator.h │ ├── commentator.inl │ ├── contracts.h │ ├── debug.C │ ├── debug.h │ ├── error.C │ ├── error.h │ ├── field-axpy.h │ ├── formats │ │ ├── Makefile.am │ │ ├── generic-dense.h │ │ ├── maple.h │ │ ├── matrix-market.h │ │ ├── matrix-stream-readers.h │ │ ├── sms.h │ │ └── sparse-row.h │ ├── iml_wrapper.h │ ├── matrix-stream.h │ ├── matrix-stream.inl │ ├── mpicpp.h │ ├── mpicpp.inl │ ├── prime-stream.h │ ├── serialization.h │ ├── serialization.inl │ ├── timer.h │ ├── util.doxy │ └── write-mm.h └── vector │ ├── Makefile.am │ ├── bit-vector.h │ ├── bit-vector.inl │ ├── blas-subvector.h │ ├── blas-vector.h │ ├── light_container.h │ ├── pair.h │ ├── random.h │ ├── reverse.h │ ├── slicedpolynomialvector │ ├── SlicedPolynomialMatrixVectorMulKaratsuba.h │ ├── SlicedPolynomialMatrixVectorMulKaratsuba.inl │ ├── SlicedPolynomialVector.h │ ├── SlicedPolynomialVector.inl │ ├── SlicedPolynomialVectorAddSub.h │ └── SlicedPolynomialVectorAddSub.inl │ ├── sparse.h │ ├── stream-gf2.h │ ├── stream.h │ ├── subiterator.h │ ├── subvector.h │ ├── vector-domain-gf2.h │ ├── vector-domain-gf2.inl │ ├── vector-domain.h │ ├── vector-domain.inl │ ├── vector-traits.h │ ├── vector.doxy │ └── vector.h ├── macros ├── aclocal-include.m4 ├── ax_cxx_compile_stdcxx_11.m4 ├── common.m4 ├── config-header.m4 ├── debug.m4 ├── fflas-ffpack-check.m4 ├── flint-check.m4 ├── fplll-check.m4 ├── iml-check.m4 ├── instr_set.m4 ├── lapack-check.m4 ├── lidia-check.m4 ├── linbox-benchmark.m4 ├── linbox-doc.m4 ├── linbox-misc.m4 ├── linbox-opt.m4 ├── maple-check-version.mpl ├── maple-check.m4 ├── mpfr-check.m4 ├── mpi-check.m4 ├── ntl-check.m4 ├── ocl-check.m4 ├── saclib-check.m4 └── tinyxml2-check.m4 ├── template.h └── tests ├── .gitignore ├── Makefile.am ├── TODO ├── benchmark-blas-domain.C ├── benchmark-fields.C ├── checker.C ├── data ├── 30_30_27.sms ├── Makefile.am ├── fib25.sms ├── generic-dense.matrix ├── maple-dense1.matrix ├── maple-sparse1.matrix ├── matrix-market-array.matrix ├── matrix-market-coordinate.matrix ├── rk9_7_10.sms ├── sms.matrix └── sparse-row.matrix ├── jenkins-maker.sh ├── matrix ├── Makefile.am ├── coin.h ├── hadamard.h ├── invhilb.h ├── jmat.h ├── minmax.h ├── randomans.h └── randommat.h ├── perfpublisher.sh ├── test-bitonic-sort.C ├── test-blackbox-block-container.C ├── test-blackbox.h ├── test-blas-domain-mul.C ├── test-blas-domain.C ├── test-blas-matrix.C ├── test-block-ring.C ├── test-block-wiedemann.C ├── test-butterfly.C ├── test-charpoly.C ├── test-commentator.C ├── test-common.h ├── test-common.inl ├── test-companion.C ├── test-cra.C ├── test-cradomain.C ├── test-dense.C ├── test-det.C ├── test-diagonal.C ├── test-dif.C ├── test-direct-sum.C ├── test-dyadic-to-rational.C ├── test-echelon-form.C ├── test-ffpack.C ├── test-fft.C ├── test-fibb.C ├── test-field.h ├── test-frobenius-large.C ├── test-frobenius-leading-invariants.C ├── test-frobenius-small.C ├── test-frobenius.C ├── test-frobenius.h ├── test-ftrmm.C ├── test-generic.h ├── test-getentry.C ├── test-gf2.C ├── test-givaro-interfaces.C ├── test-givaro-zpz.C ├── test-givaro-zpzuns.C ├── test-givaropoly.C ├── test-gmp-rational.C ├── test-hadamard-bound.C ├── test-hilbert.C ├── test-hom.C ├── test-image-field.C ├── test-inverse.C ├── test-isposdef.C ├── test-ispossemidef.C ├── test-la-block-lanczos.C ├── test-last-invariant-factor.C ├── test-local-smith-form-sparseelim.C ├── test-matpoly-mult.C ├── test-matrix-domain.C ├── test-matrix-domain.h ├── test-matrix-stream.C ├── test-matrix-utils.h ├── test-mg-block-lanczos.C ├── test-minpoly.C ├── test-modular-balanced-double.C ├── test-modular-balanced-float.C ├── test-modular-balanced-int.C ├── test-modular-byte.C ├── test-modular-double.C ├── test-modular-float.C ├── test-modular-int.C ├── test-modular-short.C ├── test-modular.C ├── test-moore-penrose.C ├── test-mpi-comm.C ├── test-ntl-hankel.C ├── test-ntl-lzz_p.C ├── test-ntl-lzz_pe.C ├── test-ntl-lzz_pex.C ├── test-ntl-lzz_px.C ├── test-ntl-rr.C ├── test-ntl-sylvester.C ├── test-ntl-toeplitz.C ├── test-ntl-zz_p.C ├── test-nullspace.C ├── test-one-invariant-factor.C ├── test-opencl-domain.C ├── test-optimization.C ├── test-order-basis.C ├── test-param-fuzzy.C ├── test-permutation.C ├── test-plain-domain.C ├── test-poly-det.C ├── test-poly-smith-form.h ├── test-polynomial-matrix.C ├── test-polynomial-ring.C ├── test-qlup.C ├── test-quad-matrix.C ├── test-randiter-nonzero-prime.C ├── test-random-matrix.C ├── test-rank-Int.C ├── test-rank-ex.C ├── test-rank-md.C ├── test-rank-u32.C ├── test-rank.h ├── test-rat-charpoly.C ├── test-rat-minpoly.C ├── test-rat-solve.C ├── test-rational-matrix-factory.C ├── test-rational-reconstruction-base.C ├── test-rational-solver-adaptive.C ├── test-rational-solver.C ├── test-regression.C ├── test-regression2.C ├── test-scalar-matrix.C ├── test-serialization.C ├── test-smith-form-adaptive.C ├── test-smith-form-binary.C ├── test-smith-form-iliopoulos.C ├── test-smith-form-kannan-bachem.C ├── test-smith-form-local.C ├── test-smith-form-valence.C ├── test-smith-form.C ├── test-smith-form.h ├── test-solve-full.C ├── test-solve-nonsingular.C ├── test-solve.C ├── test-sparse-map-map.C ├── test-sparse.C ├── test-subiterator.C ├── test-submatrix.C ├── test-subvector.C ├── test-sum.C ├── test-toeplitz-det.C ├── test-toeplitz.C ├── test-toom-cook.C ├── test-trace.C ├── test-transpose.C ├── test-triplesbb.C ├── test-tutorial.C ├── test-vector-domain.C ├── test-vector-domain.h ├── test-weak-popov-form.C ├── test-zero-one.C ├── test_leak.sh └── tests.doxy /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore all and unignore all with extensions, 2 | # so that no-extensions files are ignored by default. 3 | * 4 | !/**/ 5 | !*.* 6 | 7 | # Ignore generated files and folders 8 | **/Makefile.in 9 | **/*.log 10 | **/*.trs 11 | **/*.o 12 | **/*.exe 13 | **/*~ 14 | **/*.la 15 | **/*.lo 16 | **/.libs 17 | **/.deps/ 18 | 19 | # Ignore specific folders 20 | .vscode/ 21 | autom4te.cache/ 22 | build-aux/ 23 | 24 | # Ignore specific files 25 | _configs.sed 26 | aclocal.m4 27 | autogen.status 28 | config.h 29 | config.h.in 30 | config.status 31 | linbox.pc 32 | macros/libtool.m4 33 | macros/ltoptions.m4 34 | macros/ltsugar.m4 35 | macros/ltversion.m4 36 | macros/lt~obsolete.m4 37 | 38 | # @todo Don't know why that is here 39 | tests/.tmp-tests 40 | tests/checker.dSYM/ 41 | -------------------------------------------------------------------------------- /HACKING: -------------------------------------------------------------------------------- 1 | Please go to http://www.linalg.org/developer.html (or ./doc/install-dev.html) 2 | 3 | ================== 4 | The Linbox Team 5 | -------------------------------------------------------------------------------- /RELEASE-INSTRUCTIONS: -------------------------------------------------------------------------------- 1 | Instructions for making a LinBox release: 2 | 3 | 1. Run 'svn up ' to make sure you are fully up to date and on the 4 | HEAD branch [1] 5 | 2. Update the version number in Makefile.am next to 'VERSION = ', and in configure.in:3 6 | 3. Run 'make distcheck' on your local copy of LinBox. If there are any 7 | problems, fix them and commit the fixes to CVS. Usually problems 8 | will be things like header files that are not being installed, but 9 | should be. Make sure 'make distcheck' runs once without having any 10 | errors before moving onto the next step. Also, record all of the 11 | changes you make in ChangeLog. 12 | 4. Add a ChangeLog entry for Makefile.am with the text 'New version 13 | ' where is the version you are releasing. 14 | 5. Make sure everything in your local copy of LinBox is committed. In 15 | particular, either commit or eliminate anything from step 1 that 16 | was marked modified. 17 | 6. Run 'make dist' (or 'make distcheck') so that the last ChangeLog 18 | entry is included in your tarball. 19 | 7. Copy the tarball produced in step 6 to the web server. 20 | 8. Update the LinBox web site with information on the new release -- 21 | mention it in news.html and update the latest version information 22 | in index.html and download.html 23 | 24 | [1] Of course, this assumes that you want to release from the head 25 | branch. If HEAD represents the development version and you 26 | actually want to release from a stable branch, you should use 27 | cvs up -dP -r linbox- 28 | where is the version identifier in the stable branch -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -ex 2 | 3 | srcdir=`dirname $0` 4 | test -z "$srcdir" && srcdir=. 5 | 6 | # Recover command line, with double-quotes 7 | CMDLINE="" 8 | for arg in "$@" 9 | do 10 | WHO="`echo $arg | cut -d'=' -f1`" 11 | WHAT="`echo $arg | cut -s -d'=' -f2`" 12 | if test "x$WHAT" = "x"; then 13 | CMDLINE="$CMDLINE $WHO" 14 | else 15 | CMDLINE="$CMDLINE $WHO=\"$WHAT\"" 16 | fi 17 | done 18 | 19 | echo "$0 $CMDLINE" > $srcdir/autogen.status 20 | chmod +x $srcdir/autogen.status 21 | 22 | # run autoconf, libtoolize, automake, etc. 23 | autoreconf -vif $srcdir 24 | 25 | # run configure script 26 | if test x$NOCONFIGURE = x; then 27 | $srcdir/configure "$@" 28 | fi 29 | -------------------------------------------------------------------------------- /benchmarks/benchmark-metadata.C: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2013 LinBox 2 | * Written by Brice Boyer (briceboyer) 3 | * 4 | * 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | /*! @file benchmarks/benchmark-metadata.C 26 | * @ingroup benchmarks 27 | * @brief metadata 28 | */ 29 | 30 | #ifndef __LINBOX_benchmarks_benchmark_metadata_C 31 | #define __LINBOX_benchmarks_benchmark_metadata_C 32 | 33 | 34 | 35 | #endif // __LINBOX_benchmarks_benchmark_metadata_C 36 | 37 | // Local Variables: 38 | // mode: C++ 39 | // tab-width: 4 40 | // indent-tabs-mode: nil 41 | // c-basic-offset: 4 42 | // End: 43 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 44 | -------------------------------------------------------------------------------- /benchmarks/benchmark.doxy: -------------------------------------------------------------------------------- 1 | /* 2 | * Coypright (c) LinBox 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | * 21 | */ 22 | 23 | /*! \ingroup linbox 24 | * \defgroup benchmarks Benchmarks 25 | * @brief This directory is used to perform benchmarks on LinBox. 26 | * The benchmarks are meant for : 27 | * - the \e user to guide her through the various choices of 28 | * algorithms/implementation provided in her particular case. 29 | * - the \e developer to test her new algorithms against the others or check 30 | * that the newest shiny subroutine she just wrote didn't deteriorate too much 31 | * the performance of LinBox :) (regression testing purpose). 32 | * . 33 | * 34 | * Benchmarks can be grouped in : 35 | * - basic routines (fflas/ffpack, integer operations,...) ; 36 | * - algorithms ; 37 | * - solutions. 38 | * . 39 | * 40 | * When another free library (NTL, IML,...) provides a routine that exists in 41 | * LinBox, we want to be able to compare it to our implementation. 42 | * 43 | * Default parameters can be changed on the command-line, just as in \c 44 | * examples/ and \c tests/. 45 | */ 46 | 47 | // vim:syntax=doxygen 48 | -------------------------------------------------------------------------------- /benchmarks/data/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 the LinBox group 2 | # Brice Boyer (briceboyer) 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # 6 | # LinBox is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # ========LICENCE======== 20 | #/ 21 | 22 | 23 | cleanup : 24 | \rm -rf *dat *tex *gp *xml *csv *html *eps 25 | -------------------------------------------------------------------------------- /benchmarks/matrix/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 the LinBox group 2 | # Brice Boyer (briceboyer) 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # 6 | # LinBox is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # ========LICENCE======== 20 | #/ 21 | 22 | 23 | -------------------------------------------------------------------------------- /benchmarks/matrix/bibd_12_5_66x792.sms.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linbox-team/linbox/48953a8a39a3cb06dd2382afed119b5213824854/benchmarks/matrix/bibd_12_5_66x792.sms.gz -------------------------------------------------------------------------------- /benchmarks/matrix/bibd_13_6_78x1716.sms.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linbox-team/linbox/48953a8a39a3cb06dd2382afed119b5213824854/benchmarks/matrix/bibd_13_6_78x1716.sms.gz -------------------------------------------------------------------------------- /benchmarks/matrix/bibd_14_7_91x3432.sms.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linbox-team/linbox/48953a8a39a3cb06dd2382afed119b5213824854/benchmarks/matrix/bibd_14_7_91x3432.sms.gz -------------------------------------------------------------------------------- /doc/index-dev.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 27 | 28 | 29 | LinBox documentation for Developers 30 | 31 | 32 | 33 | 34 |

Dead link

35 |

36 | If you reached and see this page, then you need to compile the documentation first 37 | with

38 | 			> make docs_dev.
39 | 		
40 |

41 | 42 |

43 | You may also want to return to users documentation or wait till the docs are built (auto refreshing page). 44 |

45 | 46 | 47 | -------------------------------------------------------------------------------- /doc/linbox-config.1: -------------------------------------------------------------------------------- 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36. 2 | .TH LINBOX-CONFIG "1" "June 2008" "linbox-config 1.1.6rc0" "User Commands" 3 | .SH NAME 4 | linbox-config \- tool for linking against LinBox 5 | .SH SYNOPSIS 6 | .B linbox-config 7 | [\fIOPTION\fR] 8 | .SH DESCRIPTION 9 | Known values for OPTION are: 10 | .TP 11 | \fB\-\-prefix\fR 12 | show Linbox installation prefix 13 | .TP 14 | \fB\-\-libs\fR 15 | print library linking information 16 | .TP 17 | \fB\-\-cflags\fR 18 | print pre\-processor and compiler flags 19 | .TP 20 | \fB\-\-help\fR 21 | display this help and exit 22 | .TP 23 | \fB\-\-version\fR 24 | output version information 25 | .SH "SEE ALSO" 26 | The full documentation for 27 | .B linbox-config 28 | is maintained as a Texinfo manual. If the 29 | .B info 30 | and 31 | .B linbox-config 32 | programs are properly installed at your site, the command 33 | .IP 34 | .B info linbox-config 35 | .PP 36 | should give you access to the complete manual. 37 | -------------------------------------------------------------------------------- /doc/linbox.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 27 | 28 | Starter to LinBox documentation 29 | 31 | 33 | 34 | 35 | LinBox documentation main page: linbox-html/index.html 36 | (going there in 5 seconds). 37 | 38 | If it is a dead link, you have to build the documentation first 39 | with make docs. 40 | 41 | 42 | -------------------------------------------------------------------------------- /doc/organization/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # see COPYING for licence 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # 6 | # LinBox is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # ========LICENCE======== 20 | 21 | 22 | 23 | EXTRA_DIST=\ 24 | Linbox.draft 25 | -------------------------------------------------------------------------------- /doc/tex/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | if USE_DOCPLUSPLUS_TEX 23 | USE_TARGETS = linbox.tex linbox.ps linbox.dvi 24 | endif 25 | 26 | CLEANFILES = linbox.tex linbox.ps 27 | MOSTLYCLEANFILES = linbox.aux linbox.log linbox.dvi 28 | 29 | all-local: $(USE_TARGETS) 30 | 31 | linbox.ps: linbox.dvi 32 | dvips linbox.dvi -o linbox.ps 33 | 34 | linbox.dvi: linbox.tex 35 | latex "\scrollmode\input linbox"; exit 0 36 | 37 | linbox.tex: $(top_srcdir)/linbox/linbox.dxx 38 | doc++ -t -o linbox.tex $(top_srcdir)/linbox/linbox.dxx 39 | -------------------------------------------------------------------------------- /docker-auto.run: -------------------------------------------------------------------------------- 1 | > sudo docker run -it debian:12 bash 2 | 3 | apt update 4 | apt install git make g++ gfortran libtool automake autoconf pkg-config wget bzip2 5 | cd; wget https://raw.githubusercontent.com/linbox-team/linbox/refs/heads/master/linbox-auto-install.sh 6 | chmod +x linbox-auto-install.sh 7 | ./linbox-auto-install.sh --enable-openblas=yes --enable-gmp=yes --make-flags="-j 56" 8 | -------------------------------------------------------------------------------- /examples/Readme: -------------------------------------------------------------------------------- 1 | See also matrix examples in ../../tests/data/ 2 | -------------------------------------------------------------------------------- /examples/attic/map-sparse-test.C: -------------------------------------------------------------------------------- 1 | #include "examples/map-sparse.h" 2 | #include //bb: is this supposed to be installed ? 3 | 4 | using namespace LinBox; 5 | 6 | // why this test here ? 7 | int main(int argc, char* argv[]) 8 | { 9 | typedef Givaro::Modular Field; 10 | typedef Field::Element Element; 11 | int q=65537; 12 | int n=10; 13 | 14 | static Argument args[] = { 15 | { 'n', "-n N", "Set dimension of test matrices to NxN.", TYPE_INT, &n }, 16 | { 'q', "-q Q", "Operate over the \"field\" GF(Q) [1].", TYPE_INTEGER, &q }, 17 | //{ 's', "-s S", "Sparse matrices with density S.", TYPE_DOUBLE, &sparsity }, 18 | END_OF_ARGUMENTS 19 | }; 20 | 21 | parseArguments (argc, argv, args); 22 | 23 | srand ((unsigned)time (NULL)); 24 | Field F (q); 25 | MapSparse ms(F,n,n); 26 | Element d; 27 | for (int i=0;is,f0,{0,g0,(0,\:0,t0,+0,=s 64 | -------------------------------------------------------------------------------- /examples/data/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # This file is part of LinBox 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # 6 | # LinBox is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # ========LICENCE======== 20 | #/ 21 | 22 | EXTRA_DIST = \ 23 | lowmat.sms \ 24 | mat.txt \ 25 | mat2.txt \ 26 | symmat.sms \ 27 | wikivote \ 28 | zeromat.sms 29 | -------------------------------------------------------------------------------- /examples/data/lowmat.sms: -------------------------------------------------------------------------------- 1 | 5 5 M 2 | 1 1 1 3 | 1 2 1 4 | 1 3 1 5 | 1 4 1 6 | 1 5 1 7 | 2 1 1 8 | 2 2 1 9 | 2 3 -1 10 | 2 4 -1 11 | 2 5 -1 12 | 3 1 1 13 | 3 2 -1 14 | 3 3 1 15 | 3 4 -1 16 | 3 5 -1 17 | 4 1 1 18 | 4 2 -1 19 | 4 3 -1 20 | 4 4 1 21 | 4 5 -1 22 | 5 1 1 23 | 5 2 -1 24 | 5 3 -1 25 | 5 4 -1 26 | 5 5 1 27 | 0 0 0 28 | -------------------------------------------------------------------------------- /examples/data/mat.txt: -------------------------------------------------------------------------------- 1 | 4 4 M 2 | 1 1 1 3 | 1 2 2 4 | 1 3 8 5 | 1 4 9 6 | 2 2 3 7 | 3 1 9 8 | 0 0 0 9 | -------------------------------------------------------------------------------- /examples/data/mat2.txt: -------------------------------------------------------------------------------- 1 | 2 2 M 2 | 1 1 1 3 | 1 2 2 4 | 2 1 3 5 | 2 2 4 6 | 0 0 0 7 | -------------------------------------------------------------------------------- /examples/data/symmat.sms: -------------------------------------------------------------------------------- 1 | 5 5 M 2 | 1 1 1 3 | 1 2 1 4 | 1 3 1 5 | 1 4 1 6 | 1 5 1 7 | 2 1 1 8 | 2 2 1 9 | 3 1 1 10 | 3 3 1 11 | 4 1 1 12 | 4 4 1 13 | 5 1 1 14 | 5 5 1 15 | 0 0 0 16 | -------------------------------------------------------------------------------- /examples/data/zeromat.sms: -------------------------------------------------------------------------------- 1 | 1 1 M 2 | 0 0 0 3 | -------------------------------------------------------------------------------- /examples/examples.doxy: -------------------------------------------------------------------------------- 1 | //Copyright (C) 2005 David Saunders, part of LinBox. GNU LGPL, see COPYING. 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** \ingroup linbox 23 | \defgroup examples examples 24 | 25 | \brief Ilustrations of the LinBox library in use. 26 | 27 | Some of these examples serve a particular purpose such as computing 28 | a linear algebra function on an integer matrix stored in a file. 29 | Some were written expressly to illustrate writing code that uses LinBox. 30 | */ 31 | 32 | 33 | 34 | // vim:syn=doxygen 35 | -------------------------------------------------------------------------------- /examples/genprime.C: -------------------------------------------------------------------------------- 1 | #include "linbox/linbox-config.h" 2 | #include 3 | #include "stdlib.h" 4 | #include "linbox/randiter/random-prime.h" 5 | 6 | using namespace LinBox; 7 | 8 | int main(int argc, char**argv){ 9 | 10 | PrimeIterator gen(7); 11 | 12 | for (int i=0; i < atoi(argv[1]);i++){ 13 | integer p = *gen; 14 | std::cout< 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | du -h tes * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | #ifndef __LINBOX_lb_blackbox_abstract_H 26 | #define __LINBOX_lb_blackbox_abstract_H 27 | 28 | #include 29 | #include 30 | 31 | 32 | /******************************** 33 | * Abstract object for Blackbox * 34 | ********************************/ 35 | class BlackboxAbstract : public LinBoxBaseVisitable{ 36 | public: 37 | virtual ~BlackboxAbstract(){}; 38 | virtual BlackboxAbstract* clone() const =0; 39 | virtual void* getPtr() const =0; 40 | virtual const DomainKey& getDomainKey() const =0; 41 | virtual const char* info() const =0; 42 | virtual void rebind(const DomainKey&) =0; 43 | LINBOX_VISITABLE(); 44 | }; 45 | 46 | 47 | 48 | 49 | #endif 50 | 51 | // Local Variables: 52 | // mode: C++ 53 | // tab-width: 4 54 | // indent-tabs-mode: nil 55 | // c-basic-offset: 4 56 | // End: 57 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 58 | -------------------------------------------------------------------------------- /interfaces/driver/lb-blackbox-collection.h: -------------------------------------------------------------------------------- 1 | /* lb-blackbox-collection.h 2 | * Copyright (C) 2005 Pascal Giorgi 3 | * 4 | * Written by Pascal Giorgi 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | du -h tes * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | #ifndef __LINBOX_lb_blackbox_collection_H 26 | #define __LINBOX_lb_blackbox_collection_H 27 | 28 | #include 29 | #include 30 | 31 | 32 | /************************** 33 | * Collection of Blackbox * 34 | **************************/ 35 | 36 | // definition of a key 37 | typedef size_t BlackboxKey; 38 | 39 | // comparison functor on key 40 | struct BlackboxKeyLessThan{ bool operator()(const BlackboxKey& k1, const BlackboxKey &k2) {return (k1 < k2);} }; 41 | 42 | // definition of a hash table type 43 | typedef std::map BlackboxTable; 44 | 45 | 46 | 47 | 48 | 49 | 50 | #endif 51 | 52 | // Local Variables: 53 | // mode: C++ 54 | // tab-width: 4 55 | // indent-tabs-mode: nil 56 | // c-basic-offset: 4 57 | // End: 58 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 59 | -------------------------------------------------------------------------------- /interfaces/driver/lb-domain-abstract.h: -------------------------------------------------------------------------------- 1 | /* lb-domain-abstract.h 2 | * Copyright (C) 2005 Pascal Giorgi 3 | * 4 | * Written by Pascal Giorgi 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | du -h tes * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | #ifndef __LINBOX_lb_domain_abstract_H 26 | #define __LINBOX_lb_domain_abstract_H 27 | 28 | #include 29 | 30 | 31 | /****************************** 32 | * Abstract object for Domains * 33 | *******************************/ 34 | class DomainAbstract : public LinBoxBaseVisitable { 35 | public: 36 | virtual ~DomainAbstract() {} 37 | //virtual const char* info() const =0; 38 | virtual DomainAbstract* clone() const =0; 39 | LINBOX_VISITABLE(); 40 | }; 41 | 42 | 43 | 44 | #endif 45 | 46 | // Local Variables: 47 | // mode: C++ 48 | // tab-width: 4 49 | // indent-tabs-mode: nil 50 | // c-basic-offset: 4 51 | // End: 52 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 53 | -------------------------------------------------------------------------------- /interfaces/driver/lb-element-abstract.h: -------------------------------------------------------------------------------- 1 | /* lb-element-abstract.h 2 | * Copyright (C) 2005 Pascal Giorgi 3 | * 4 | * Written by Pascal Giorgi 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | du -h tes * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | #ifndef __LINBOX_lb_element_abstract_H 26 | #define __LINBOX_lb_element_abstract_H 27 | 28 | #include 29 | #include 30 | 31 | 32 | /******************************** 33 | * Abstract object for Elements * 34 | ********************************/ 35 | class EltAbstract { 36 | public: 37 | virtual ~EltAbstract(){} 38 | virtual EltAbstract* clone() const =0; 39 | virtual const DomainKey& getDomainKey() const =0; 40 | //virtual const char* info() const =0; 41 | }; 42 | 43 | 44 | 45 | #endif 46 | 47 | // Local Variables: 48 | // mode: C++ 49 | // tab-width: 4 50 | // indent-tabs-mode: nil 51 | // c-basic-offset: 4 52 | // End: 53 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 54 | -------------------------------------------------------------------------------- /interfaces/driver/lb-element-collection.h: -------------------------------------------------------------------------------- 1 | /* lb-element-collection.h 2 | * Copyright (C) 2005 Pascal Giorgi 3 | * 4 | * Written by Pascal Giorgi 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | du -h tes * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | #ifndef __LINBOX_lb_collection_H 26 | #define __LINBOX_lb_collection_H 27 | 28 | #include 29 | #include 30 | 31 | 32 | /************************** 33 | * Collection of Elements * 34 | **************************/ 35 | 36 | // definition of a unique key 37 | typedef size_t EltKey; 38 | 39 | // comparison functor on key 40 | struct EltKeyLessThan{ 41 | bool operator()(const EltKey& k1, const EltKey &k2) 42 | { return (k1 < k2);} 43 | }; 44 | 45 | // definition of a hash table type 46 | typedef std::map EltTable; 47 | 48 | // definition of a serial element 49 | struct SerialElement { 50 | const char* type; 51 | std::list list; 52 | }; 53 | 54 | #endif 55 | 56 | // Local Variables: 57 | // mode: C++ 58 | // tab-width: 4 59 | // indent-tabs-mode: nil 60 | // c-basic-offset: 4 61 | // End: 62 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 63 | -------------------------------------------------------------------------------- /interfaces/driver/lb-element.h: -------------------------------------------------------------------------------- 1 | /* lb-element.h 2 | * Copyright (C) 2005 Pascal Giorgi 3 | * 4 | * Written by Pascal Giorgi 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | 26 | #ifndef __LINBOX_lb_element_H 27 | #define __LINBOX_lb_element_H 28 | 29 | 30 | #include 31 | #include 32 | 33 | 34 | /******************************************* 35 | * API to contruct a element over a domain * 36 | *******************************************/ 37 | const EltKey& createElement(const DomainKey &key); 38 | 39 | 40 | /********************************************* 41 | * API to write an a element over its domain * 42 | *********************************************/ 43 | void writeElement (const EltKey &key, std::ostream &os); 44 | 45 | /******************************* 46 | * API to serialize an element * 47 | *******************************/ 48 | void SerializeElement (SerialElement &s, const EltKey &key); 49 | 50 | 51 | #endif 52 | 53 | // Local Variables: 54 | // mode: C++ 55 | // tab-width: 4 56 | // indent-tabs-mode: nil 57 | // c-basic-offset: 4 58 | // End: 59 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 60 | -------------------------------------------------------------------------------- /interfaces/driver/lb-minpoly.h: -------------------------------------------------------------------------------- 1 | /* lb-minpoly.h 2 | * Copyright (C) 2005 Pascal Giorgi 3 | * 4 | * Written by Pascal Giorgi 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | #ifndef __LINBOX_lb_minpoly_H 26 | #define __LINBOX_lb_minpoly_H 27 | 28 | #include 29 | #include 30 | 31 | /************************************************************* 32 | * API for minimal polynomial computation * 33 | * minimal polynomial is returned through a given vector key * 34 | *************************************************************/ 35 | void lb_minpoly(const VectorKey &res, const BlackboxKey& key); 36 | 37 | 38 | /******************************************************* 39 | * API for minimal polynomial computation * 40 | * minimal polynomial is returned through a vector key * 41 | *******************************************************/ 42 | const VectorKey& lb_minpoly(const BlackboxKey& key); 43 | 44 | 45 | #endif 46 | 47 | // Local Variables: 48 | // mode: C++ 49 | // tab-width: 4 50 | // indent-tabs-mode: nil 51 | // c-basic-offset: 4 52 | // End: 53 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 54 | -------------------------------------------------------------------------------- /interfaces/driver/lb-vector-abstract.h: -------------------------------------------------------------------------------- 1 | /* lb-vector-abstract.h 2 | * Copyright (C) 2005 Pascal Giorgi 3 | * 4 | * Written by Pascal Giorgi 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | du -h tes * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | #ifndef __LINBOX_lb_vector_abstract_H 26 | #define __LINBOX_lb_vector_abstract_H 27 | 28 | #include 29 | #include 30 | 31 | 32 | /******************************* 33 | * Abstract object for Vectors * 34 | *******************************/ 35 | class VectorAbstract : public LinBoxBaseVisitable { 36 | public: 37 | virtual ~VectorAbstract(){} 38 | virtual VectorAbstract* clone() const =0; 39 | virtual void* getPtr() const =0; 40 | virtual const DomainKey& getDomainKey() const =0; 41 | virtual const char* info() const =0; 42 | virtual void rebind(const DomainKey&) =0; 43 | LINBOX_VISITABLE(); 44 | }; 45 | 46 | 47 | #endif 48 | 49 | // Local Variables: 50 | // mode: C++ 51 | // tab-width: 4 52 | // indent-tabs-mode: nil 53 | // c-basic-offset: 4 54 | // End: 55 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 56 | -------------------------------------------------------------------------------- /interfaces/driver/lb-vector-collection.h: -------------------------------------------------------------------------------- 1 | /* lb-vector-collection.h 2 | * Copyright (C) 2005 Pascal Giorgi 3 | * 4 | * Written by Pascal Giorgi 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | du -h tes * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | #ifndef __LINBOX_lb_vector_collection_H 26 | #define __LINBOX_lb_vector_collection_H 27 | 28 | #include 29 | #include 30 | 31 | 32 | /************************* 33 | * Collection of Vectors * 34 | *************************/ 35 | 36 | // definition of a key 37 | typedef size_t VectorKey; 38 | 39 | // comparison functor on key 40 | struct VectorKeyLessThan{ bool operator()(const VectorKey& k1, const VectorKey &k2) { return (k1 < k2);}}; 41 | 42 | // definition of a hash table type 43 | typedef std::map VectorTable; 44 | 45 | // definition of a serial vector 46 | struct SerialVector { 47 | const char* type; 48 | std::vector list; 49 | }; 50 | 51 | 52 | 53 | #endif 54 | 55 | // Local Variables: 56 | // mode: C++ 57 | // tab-width: 4 58 | // indent-tabs-mode: nil 59 | // c-basic-offset: 4 60 | // End: 61 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 62 | -------------------------------------------------------------------------------- /interfaces/kaapi/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | pkgincludesubdir=$(pkgincludedir)/kaapi 22 | 23 | pkgincludesub_HEADERS = \ 24 | communicate.h 25 | 26 | -------------------------------------------------------------------------------- /interfaces/maple-old/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | INCLUDES=-I$(top_srcdir) 23 | 24 | AM_CPPFLAGS= $(NTL_CFLAGS) $(ATLAS_CFLAGS) $(MAPLE_CFLAGS) 25 | 26 | EXTRA_DIST = lbmaple.C lbmaple.mpl.head lbmaple.mpl.tail Makefile.in.1 Makefile.in.2 demonstration.mws 27 | 28 | lib_LTLIBRARIES=liblbmaple.la liblbmapleffpack.la 29 | 30 | liblbmaple_la_SOURCES=lbmaple.C 31 | liblbmaple_la_LDFLAGS=$(top_builddir)/linbox/liblinbox.la $(NTL_LIBS) $(MAPLE_LIBS) 32 | 33 | liblbmapleffpack_la_SOURCES=lbmaple-ffpack.C 34 | liblbmapleffpack_la_LDFLAGS=$(top_builddir)/linbox/liblinbox.la $(ATLAS_LIBS) $(NTL_LIBS) $(MAPLE_LIBS) 35 | 36 | install-data-local: 37 | $(INSTALL_DATA) lbmaple.mpl $(libdir)/lbmaple.mpl 38 | -------------------------------------------------------------------------------- /interfaces/maple-old/lbmaple.mpl.head: -------------------------------------------------------------------------------- 1 | module LinBox() 2 | local create, destroy, lbXapply, lbXapplyT, lbXinitBB, lbXinitV, 3 | lbXrank, lbXdet, lbXmp, lbXssolve, lbXstart1, lbXstart2, 4 | lbXend, lbXgetMatrix, lbXkillMatrix, lbXgetVector, lbXkillVector, lbXgetEntryVector, lbXgetEntryMatrix, ExToMap, MapToEx, libname, ObjKeyCount; 5 | export LinBoxBB, LBrank, LBdet, LBminpoly, LBapply, LBapplyTranspose, LinBoxV; # LBDiag, LBSolve; 6 | option package, load=create, unload=destroy; 7 | description "Maple interface to LinBox methods & functions"; 8 | 9 | create := proc() 10 | global `type/LinBoxBB`, `type/LinBoxV`; 11 | libname := -------------------------------------------------------------------------------- /interfaces/maple/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | if LINBOX_HAVE_MAPLE 23 | pkgincludesubdir=$(includedir)/interfaces/maple/new 24 | 25 | 26 | AM_CPPFLAGS=-I$(top_srcdir) -I. -I../../linbox -I../driver -DDISABLE_COMMENTATOR 27 | AM_CXXFLAGS=$(LINBOX_CXXFLAGS) $(FFLAS_FFPACK_CFLAGS) $(LINBOX_DEPS_CFLAGS) $(MAPLE_CFLAGS) 28 | 29 | lib_LTLIBRARIES=liblbmaple.la 30 | 31 | liblbmaple_la_SOURCES= lb-maple.C 32 | 33 | liblbmaple_la_LDFLAGS=$(LINBOX_DEPS_LIBS) $(FFLAS_FFPACK_LIBS) $(LINBOX_LDFLAGS) $(MAPLE_LIBS) $(top_srcdir)/interfaces/driver/liblbdriver.la -Wl,-zmuldefs 34 | 35 | pkginclude_HEADERS =lb-maple.h lb-maple-utilities.h 36 | 37 | 38 | install-data-local: 39 | sh lb-maple-path.sh "$(libdir)/liblbmaple.so" 40 | $(INSTALL_DATA) lb-maple.mpl $(libdir)/lb-maple.mpl 41 | 42 | install-data-hook: 43 | cd $(libdir) && \ 44 | $(MAPLE_HOME)/bin/maple lb-maple.mpl 2>&1 > /dev/null 45 | endif 46 | -------------------------------------------------------------------------------- /interfaces/maple/lb-maple-path.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | $sentence= 4 | s/lbpathvalue/lbpath:=$ARGV[1]; -------------------------------------------------------------------------------- /interfaces/maple/lb-maple-path.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | 3 | if test -r "lb-maple.mpl.bak"; then 4 | mv lb-maple.mpl.bak lb-maple.mpl 5 | fi 6 | 7 | sed -e "s|lbpathvalue|lbpath:=\"$1\";|" -i.bak lb-maple.mpl -------------------------------------------------------------------------------- /linbox-config.in: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Copyright (c) the LinBox group 4 | # This file is part of LinBox (and probably stolen here and there) 5 | # see COPYING for licence 6 | 7 | prefix=@prefix@ 8 | exec_prefix=@exec_prefix@ 9 | includedir=@includedir@ 10 | libdir=@libdir@ 11 | 12 | major=`echo @VERSION@ | cut -d'.' -f1` 13 | minor=`echo @VERSION@ | cut -d'.' -f2` 14 | micro=`echo @VERSION@ | cut -d'.' -f3` 15 | decvr=$((((($major*100)+$minor)*100)+$micro)) 16 | 17 | 18 | cflags=false 19 | libs=false 20 | 21 | 22 | usage() 23 | { 24 | cat <= 2.5.0 11 | Libs: -L${libdir} -llinbox @LINBOX_DEPS_LIBS@ 12 | Cflags: -I${includedir} -DDISABLE_COMMENTATOR @LINBOX_DEPS_CFLAGS@ @REQUIRED_FLAGS@ 13 | -------------------------------------------------------------------------------- /linbox/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # This file is part of LinBox 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # 6 | # LinBox is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # ========LICENCE======== 20 | #/ 21 | 22 | AM_CPPFLAGS=-I$(top_srcdir)/linbox 23 | AM_CXXFLAGS=$(LINBOX_CXXFLAGS) $(FFLAS_FFPACK_CFLAGS) $(LINBOX_DEPS_CFLAGS) 24 | LDADD=$(LINBOX_DEPS_LIBS) $(FFLAS_FFPACK_LIBS) $(LINBOX_LDFLAGS) 25 | 26 | SUBDIRS=util element field randiter vector matrix blackbox algorithms solutions ring polynomial 27 | 28 | 29 | BASIC_HDRS = \ 30 | linbox-config.h \ 31 | config.h \ 32 | config-blas.h \ 33 | integer.h \ 34 | linbox-tags.h 35 | 36 | NTL_HDRS = 37 | 38 | if LINBOX_HAVE_NTL 39 | USE_NTL_HDRS = $(NTL_HDRS) 40 | endif 41 | 42 | pkginclude_HEADERS = \ 43 | $(BASIC_HDRS) \ 44 | $(USE_NTL_HDRS) 45 | 46 | EXTRA_DIST = \ 47 | $(NTL_HDRS) \ 48 | linbox.doxy \ 49 | archetypes.doxy 50 | 51 | lib_LTLIBRARIES=liblinbox.la 52 | 53 | liblinbox_la_SOURCES = dummy.C 54 | 55 | liblinbox_la_LIBADD = \ 56 | util/libutil.la \ 57 | randiter/libranditer.la \ 58 | algorithms/libalgorithms.la \ 59 | $(LINBOX_DEPS_LIBS) 60 | 61 | # $(top_srcdir)/benchmarks/libbenchmarks.la \ 62 | # 63 | -------------------------------------------------------------------------------- /linbox/algorithms/cra.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 Brice Boyer (briceboyer), part of LinBox, GNU LGPL, see COPYING 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | /*! 22 | \ingroup algorithms 23 | \defgroup CRA Chinese Remaindering Algorithm 24 | 25 | @brief Chinese Remaindering (\c cra) in LinBox. 26 | 27 | NO DOC 28 | 29 | - Integer CRA 30 | @see algorithms/cra-domain.h 31 | 32 | - Rational CRA 33 | 34 | */ 35 | 36 | // vim:syntax=doxygen 37 | -------------------------------------------------------------------------------- /linbox/algorithms/default.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) LinBox 2 | * Written by Zhendong Wan 3 | * 4 | * 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | #ifndef __LINBOX_default_H 26 | #define __LINBOX_default_H 27 | 28 | /*! @file algorithms/default.h 29 | * define some const 30 | */ 31 | 32 | 33 | namespace LinBox 34 | { 35 | static const int DEFAULTLIFTHRESHOLD = 5; 36 | static const int DEFAULTOIFTHRESHOLD = 30; 37 | static const double CROSSOVER = 0.6; 38 | } 39 | 40 | #endif //__LINBOX_default_H 41 | 42 | // Local Variables: 43 | // mode: C++ 44 | // tab-width: 4 45 | // indent-tabs-mode: nil 46 | // c-basic-offset: 4 47 | // End: 48 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 49 | -------------------------------------------------------------------------------- /linbox/algorithms/diophantine-solver.C: -------------------------------------------------------------------------------- 1 | /* Copyright (C) LinBox 2 | * 3 | * 4 | * 5 | * ========LICENCE======== 6 | * This file is part of the library LinBox. 7 | * 8 | * LinBox is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * ========LICENCE======== 22 | */ 23 | 24 | 25 | #include "linbox/linbox-config.h" 26 | #include "linbox/algorithms/diophantine-solver.h" 27 | 28 | namespace LinBox 29 | { 30 | 31 | const char* solverReturnString[6] 32 | = {"OK", "FAILED", "SINGULAR", "INCONSISTENT", "BAD_PRECONDITIONER", "BAD_PRIME"}; 33 | 34 | } 35 | 36 | // Local Variables: 37 | // mode: C++ 38 | // tab-width: 4 39 | // indent-tabs-mode: nil 40 | // c-basic-offset: 4 41 | // End: 42 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 43 | -------------------------------------------------------------------------------- /linbox/algorithms/diophantine.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup algorithms 23 | @defgroup diophant Diophantine solvers 24 | @brief NO DOC YET 25 | 26 | 27 | */ 28 | 29 | // vim:syntax=doxygen 30 | -------------------------------------------------------------------------------- /linbox/algorithms/dixon-solver/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # written by Brice Boyer 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # 6 | # LinBox is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # ========LICENCE======== 20 | 21 | pkgincludesubdir=$(pkgincludedir)/algorithms/dixon-solver 22 | 23 | pkgincludesub_HEADERS = \ 24 | dixon-solver-dense.h \ 25 | dixon-solver-dense.inl \ 26 | dixon-solver-symbolic-numeric.h 27 | -------------------------------------------------------------------------------- /linbox/algorithms/elimination.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup algorithms 23 | @defgroup elim Elimination 24 | @brief NO DOC YET 25 | 26 | 27 | */ 28 | 29 | // vim:syntax=doxygen 30 | -------------------------------------------------------------------------------- /linbox/algorithms/gauss.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup algorithms 23 | @defgroup gauss Gauss 24 | @brief NO DOC YET 25 | 26 | 27 | */ 28 | 29 | // vim:syntax=doxygen 30 | -------------------------------------------------------------------------------- /linbox/algorithms/gauss/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | pkgincludesubdir=$(pkgincludedir)/algorithms/gauss 23 | 24 | 25 | pkgincludesub_HEADERS = \ 26 | gauss.inl \ 27 | gauss-det.inl \ 28 | gauss-rank.inl \ 29 | gauss-solve.inl \ 30 | gauss-nullspace.inl \ 31 | gauss-elim.inl \ 32 | gauss-pivot.inl \ 33 | gauss-gf2.inl \ 34 | gauss-elim-gf2.inl \ 35 | gauss-det-gf2.inl \ 36 | gauss-rank-gf2.inl \ 37 | gauss-pivot-gf2.inl \ 38 | gauss-solve-gf2.inl 39 | 40 | 41 | -------------------------------------------------------------------------------- /linbox/algorithms/iml.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2013 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup algorithms 23 | @defgroup iml IML 24 | @brief NO DOC YET 25 | 26 | 27 | */ 28 | 29 | // vim:syntax=doxygen 30 | -------------------------------------------------------------------------------- /linbox/algorithms/lanczos.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup algorithms 23 | @defgroup lanczos Lanczos 24 | @brief NO DOC YET 25 | 26 | 27 | */ 28 | 29 | // vim:syntax=doxygen 30 | -------------------------------------------------------------------------------- /linbox/algorithms/lattice.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2011 Brice Boyer (briceboyer), part of LinBox, GNU LGPL, see COPYING 2 | /* 3 | * Coypright (c) LinBox 4 | * ========LICENCE======== 5 | * This file is part of the library LinBox. 6 | * 7 | * LinBox is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | * ========LICENCE======== 21 | * 22 | */ 23 | 24 | 25 | /*! 26 | \ingroup algorithms 27 | \defgroup lattice Lattice reductions 28 | 29 | @brief Lattice reduction (LLL) in LinBox. 30 | 31 | This is an interface to fplll/NTL. 32 | 33 | NO DOC 34 | 35 | */ 36 | 37 | // vim:syntax=doxygen 38 | -------------------------------------------------------------------------------- /linbox/algorithms/matrix-blas3/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # written by Brice Boyer 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # 6 | # LinBox is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # ========LICENCE======== 20 | 21 | 22 | 23 | pkgincludesubdir=$(pkgincludedir)/algorithms/matrix-blas3 24 | 25 | 26 | pkgincludesub_HEADERS = mul.h \ 27 | mul-naive.inl \ 28 | mul-flint.inl \ 29 | mul-cra.inl \ 30 | mul-toomcook.inl 31 | 32 | EXTRA_DIST = \ 33 | blas3.doxy 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /linbox/algorithms/matrix-blas3/blas3.doxy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 LinBox 3 | * written by Brice Boyer (briceboyer) 4 | * 5 | * ========LICENCE======== 6 | * This file is part of the library LinBox. 7 | * 8 | * LinBox is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * ========LICENCE======== 22 | */ 23 | 24 | /** @ingroup algorithms 25 | * @defgroup blas3 26 | * @brief BLAS level 3 (matrix-matrix) operations. 27 | * We provide algorithms for : 28 | * - mul 29 | * . 30 | * We provide all kind of algorithms to be used as building blocks for mul and 31 | * other solutions. 32 | */ 33 | 34 | 35 | // vim:syn=doxygen 36 | -------------------------------------------------------------------------------- /linbox/algorithms/opencl-kernels/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | pkgincludesubdir=$(pkgincludedir)/algorithms/opencl-kernels 23 | 24 | OCL_HDRS = \ 25 | opencl-domain-kernels.inl 26 | 27 | if LINBOX_HAVE_OCL 28 | USE_OCL_HDRS = $(OCL_HDRS) 29 | endif 30 | 31 | pkgincludesub_HEADERS = \ 32 | $(USE_OCL_HDRS) 33 | 34 | 35 | -------------------------------------------------------------------------------- /linbox/algorithms/opencl-kernels/file-list.txt: -------------------------------------------------------------------------------- 1 | kernel-modulus-dp-unroll.cl 2 | kernel-modulus-sp-unroll.cl 3 | kernel-partial-8-dp-unroll.cl 4 | kernel-partial-16-sp-unroll.cl 5 | kernel-partial-32-dp-unroll.cl 6 | kernel-partial-32-sp-unroll.cl 7 | kernel-partial-1024-dp-unroll.cl 8 | kernel-partial-1024-sp-unroll.cl 9 | kernel-muladd-modulus-dp-unroll.cl 10 | kernel-muladd-modulus-sp-unroll.cl 11 | kernel-muladd-partial-8-dp-unroll.cl 12 | kernel-muladd-partial-16-sp-unroll.cl 13 | kernel-muladd-partial-32-dp-unroll.cl 14 | kernel-muladd-partial-32-sp-unroll.cl 15 | kernel-muladd-partial-1024-dp-unroll.cl 16 | kernel-muladd-partial-1024-sp-unroll.cl 17 | kernel-axpy-modulus-dp-unroll.cl 18 | kernel-axpy-modulus-sp-unroll.cl 19 | kernel-axpy-partial-8-dp-unroll.cl 20 | kernel-axpy-partial-16-sp-unroll.cl 21 | kernel-axpy-partial-32-dp-unroll.cl 22 | kernel-axpy-partial-32-sp-unroll.cl 23 | kernel-axpy-partial-1024-dp-unroll.cl 24 | kernel-axpy-partial-1024-sp-unroll.cl 25 | kernel-maxpy-modulus-dp-unroll.cl 26 | kernel-maxpy-modulus-sp-unroll.cl 27 | kernel-maxpy-partial-8-dp-unroll.cl 28 | kernel-maxpy-partial-16-sp-unroll.cl 29 | kernel-maxpy-partial-32-dp-unroll.cl 30 | kernel-maxpy-partial-32-sp-unroll.cl 31 | kernel-maxpy-partial-1024-dp-unroll.cl 32 | kernel-maxpy-partial-1024-sp-unroll.cl 33 | kernel-axmy-modulus-dp-unroll.cl 34 | kernel-axmy-modulus-sp-unroll.cl 35 | kernel-axmy-partial-8-dp-unroll.cl 36 | kernel-axmy-partial-16-sp-unroll.cl 37 | kernel-axmy-partial-32-dp-unroll.cl 38 | kernel-axmy-partial-32-sp-unroll.cl 39 | kernel-axmy-partial-1024-dp-unroll.cl 40 | kernel-axmy-partial-1024-sp-unroll.cl -------------------------------------------------------------------------------- /linbox/algorithms/opencl-kernels/kernel-axpy-partial-16-sp.cl: -------------------------------------------------------------------------------- 1 | /* 2 | * kernel_axpy_parital_16_sp.cl 3 | * 4 | * Created on: Dec 20, 2011 5 | * Author: Matthew Wezowicz 6 | */ 7 | 8 | #define BLOCK_SIZE 16 9 | 10 | __kernel void matrixAxpyKernelModular16SP(__global float* D, __global float* A, __global float* B, 11 | __global float* C, const int widthA, const int widthB, const float mod){ 12 | //Geet Workgroup ID 13 | int bx = get_group_id(0); 14 | int by = get_group_id(1); 15 | 16 | //Get Local ID 17 | int tx = get_local_id(0); 18 | int ty = get_local_id(1); 19 | 20 | //Range of indexies for submatrix of A 21 | int aBegin= widthA * BLOCK_SIZE * by; 22 | int aEnd = aBegin + widthA - 1; 23 | int aStep = BLOCK_SIZE; 24 | 25 | //Range of indecies for sub-matrix of B 26 | int bBegin = BLOCK_SIZE * bx; 27 | int bStep = BLOCK_SIZE * widthB; 28 | 29 | //Local storage of sub-matrices of A and B; 30 | __local float As[BLOCK_SIZE][BLOCK_SIZE]; 31 | __local float Bs[BLOCK_SIZE][BLOCK_SIZE]; 32 | 33 | //Temporary storage for result 34 | float Dsub = 0; 35 | 36 | //Loop over all the sub-maticies of A and B required to compute 37 | //the result sub-matrix 38 | for(int a = aBegin, b = bBegin; a < aEnd; a += aStep, b += bStep){ 39 | //Load the matricies from global memory to local memory 40 | //Each thread loads one element of each sub-matrix 41 | As[ty][tx] = A[a + widthA * ty + tx]; 42 | Bs[ty][tx] = B[b + widthB * ty + tx]; 43 | 44 | //Synchronize threads 45 | barrier(CLK_LOCAL_MEM_FENCE); 46 | 47 | //Multiply the two sub-matrices together 48 | for(int i = 0; i < BLOCK_SIZE; i++){ 49 | Dsub += As[ty][i] * Bs[i][tx]; 50 | } 51 | Dsub = fmod(Dsub, mod); 52 | 53 | //Synchronize threads 54 | barrier(CLK_LOCAL_MEM_FENCE); 55 | } 56 | //Calculates the offset inthe result matrix 57 | int d = widthB * BLOCK_SIZE * by + BLOCK_SIZE * bx; 58 | 59 | //Load, add, and normalize with element from C 60 | float c = C[d + ty * widthB + tx]; 61 | Dsub = Dsub + c; 62 | Dsub = fmod(Dsub, mod); 63 | 64 | //Add the sum to the appropriate spot 65 | D[d + ty * widthB + tx] = Dsub; 66 | } -------------------------------------------------------------------------------- /linbox/algorithms/opencl-kernels/kernel-modulus-dp.cl: -------------------------------------------------------------------------------- 1 | /* 2 | * kernel_modulus_dp.cl 3 | * 4 | * Created on: Jul 5, 2011 5 | * Author: Matthew Wezowicz 6 | */ 7 | 8 | #define BLOCK_SIZE 16 9 | #pragma OPENCL EXTENSION cl_khr_fp64 : enable 10 | 11 | __kernel void matrixMulKernelModular1DP(__global double* C, __global double* A, __global double* B, 12 | const int widthA, const int widthB, const double mod){ 13 | //Get Workgroup ID 14 | int bx = get_group_id(0); 15 | int by = get_group_id(1); 16 | 17 | //Get Local ID 18 | int tx = get_local_id(0); 19 | int ty = get_local_id(1); 20 | 21 | //Range of indecies for sub-matrix of A 22 | int aBegin = widthA * BLOCK_SIZE * by; 23 | int aEnd = aBegin + widthA - 1; 24 | int aStep = BLOCK_SIZE; 25 | 26 | //Range of indecies for sub-matrix of B 27 | int bBegin = BLOCK_SIZE * bx; 28 | int bStep = BLOCK_SIZE * widthB; 29 | 30 | //Local storage of sub-matrices of A and B 31 | __local double As[BLOCK_SIZE][BLOCK_SIZE]; 32 | __local double Bs[BLOCK_SIZE][BLOCK_SIZE]; 33 | 34 | //Temporary storage for result 35 | double Csub = 0; 36 | 37 | //Loop over all the sub-matrices of A and B required to compute 38 | //the result sub-matrix 39 | for(int a = aBegin, b = bBegin; a < aEnd; a += aStep, b += bStep){ 40 | //Load the matrices from global memory to local memory 41 | //Each thread loads one element of each sub-matrix 42 | As[ty][tx] = A[a + widthA * ty + tx]; 43 | Bs[ty][tx] = B[b + widthB * ty + tx]; 44 | 45 | //Synchronize threads 46 | barrier(CLK_LOCAL_MEM_FENCE); 47 | 48 | //Multiply the two sub-matrices together 49 | for(int i = 0; i < BLOCK_SIZE; i++){ 50 | Csub += As[ty][i] * Bs[i][tx]; 51 | //Calls fmod every iteration to normalize the partial sum 52 | Csub = fmod(Csub, mod); 53 | } 54 | 55 | //Synchronize threads 56 | barrier(CLK_LOCAL_MEM_FENCE); 57 | } 58 | //Calculates the offset in the result matrix and add the sum to the 59 | //appropriate spot 60 | int c = widthB * BLOCK_SIZE * by + BLOCK_SIZE * bx; 61 | C[c + ty * widthB + tx] = Csub; 62 | } 63 | -------------------------------------------------------------------------------- /linbox/algorithms/opencl-kernels/kernel-modulus-sp.cl: -------------------------------------------------------------------------------- 1 | /* 2 | * kernel_modulus_sp.cl 3 | * 4 | * Created on: Jul 5, 2011 5 | * Author: Matthew Wezowicz 6 | */ 7 | 8 | #define BLOCK_SIZE 16 9 | 10 | __kernel void matrixMulKernelModular1SP(__global float* C, __global float* A, __global float* B, 11 | const int widthA, const int widthB, const float mod){ 12 | //Get Workgroup ID 13 | int bx = get_group_id(0); 14 | int by = get_group_id(1); 15 | 16 | //Get Local ID 17 | int tx = get_local_id(0); 18 | int ty = get_local_id(1); 19 | 20 | //Range of indecies for sub-matrix of A 21 | int aBegin = widthA * BLOCK_SIZE * by; 22 | int aEnd = aBegin + widthA - 1; 23 | int aStep = BLOCK_SIZE; 24 | 25 | //Range of indecies for sub-matrix of B 26 | int bBegin = BLOCK_SIZE * bx; 27 | int bStep = BLOCK_SIZE * widthB; 28 | 29 | //Local storage of sub-matrices of A and B 30 | __local float As[BLOCK_SIZE][BLOCK_SIZE]; 31 | __local float Bs[BLOCK_SIZE][BLOCK_SIZE]; 32 | 33 | //Temporary storage for result 34 | float Csub = 0; 35 | 36 | //Loop over all the sub-matrices of A and B required to compute 37 | //the result sub-matrix 38 | for(int a = aBegin, b = bBegin; a < aEnd; a += aStep, b += bStep){ 39 | //Load the matrices from global memory to local memory 40 | //Each thread loads one element of each sub-matrix 41 | As[ty][tx] = A[a + widthA * ty + tx]; 42 | Bs[ty][tx] = B[b + widthB * ty + tx]; 43 | 44 | //Synchronize threads 45 | barrier(CLK_LOCAL_MEM_FENCE); 46 | 47 | //Multiply the two sub-matrices together 48 | for(int i = 0; i < BLOCK_SIZE; i++){ 49 | Csub += As[ty][i] * Bs[i][tx]; 50 | //Calls fmod every iteration to normalize the partial sum 51 | Csub = fmod(Csub, mod); 52 | } 53 | 54 | //Synchronize threads 55 | barrier(CLK_LOCAL_MEM_FENCE); 56 | } 57 | //Calculates the offset in the result matrix and add the sum to the 58 | //appropriate spot 59 | int c = widthB * BLOCK_SIZE * by + BLOCK_SIZE * bx; 60 | C[c + ty * widthB + tx] = Csub; 61 | } 62 | -------------------------------------------------------------------------------- /linbox/algorithms/opencl-kernels/kernel-partial-16-sp.cl: -------------------------------------------------------------------------------- 1 | /* 2 | * kernel_partial_16_sp.cl 3 | * 4 | * Created on: Jul 5, 2011 5 | * Author: Matthew Wezowicz 6 | */ 7 | 8 | #define BLOCK_SIZE 16 9 | 10 | __kernel void matrixMulKernelModular16SP(__global float* C, __global float* A, __global float* B, 11 | const int widthA, const int widthB, const float mod){ 12 | //Get Workgroup ID 13 | int bx = get_group_id(0); 14 | int by = get_group_id(1); 15 | 16 | //Get Local ID 17 | int tx = get_local_id(0); 18 | int ty = get_local_id(1); 19 | 20 | //Range of indecies for sub-matrix of A 21 | int aBegin = widthA * BLOCK_SIZE * by; 22 | int aEnd = aBegin + widthA - 1; 23 | int aStep = BLOCK_SIZE; 24 | 25 | //Range of indecies for sub-matrix of B 26 | int bBegin = BLOCK_SIZE * bx; 27 | int bStep = BLOCK_SIZE * widthB; 28 | 29 | //Local storage of sub-matrices of A and B 30 | __local float As[BLOCK_SIZE][BLOCK_SIZE]; 31 | __local float Bs[BLOCK_SIZE][BLOCK_SIZE]; 32 | 33 | //Temporary storage for result 34 | float Csub = 0; 35 | 36 | //Loop over all the sub-matrices of A and B required to compute 37 | //the result sub-matrix 38 | for(int a = aBegin, b = bBegin; a < aEnd; a += aStep, b += bStep){ 39 | //Load the matrices from global memory to local memory 40 | //Each thread loads one element of each sub-matrix 41 | As[ty][tx] = A[a + widthA * ty + tx]; 42 | Bs[ty][tx] = B[b + widthB * ty + tx]; 43 | 44 | //Synchronize threads 45 | barrier(CLK_LOCAL_MEM_FENCE); 46 | 47 | //Multiply the two sub-matrices together 48 | for(int i = 0; i < BLOCK_SIZE; i++){ 49 | Csub += As[ty][i] * Bs[i][tx]; 50 | } 51 | Csub = fmod(Csub, mod); 52 | 53 | //Synchronize threads 54 | barrier(CLK_LOCAL_MEM_FENCE); 55 | } 56 | 57 | //Calculates the offset in the result matrix and add the sum to the 58 | //appropriate spot 59 | int c = widthB * BLOCK_SIZE * by + BLOCK_SIZE * bx; 60 | C[c + ty * widthB + tx] = Csub; 61 | } 62 | -------------------------------------------------------------------------------- /linbox/algorithms/polynomial-matrix/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | pkgincludesubdir=$(pkgincludedir)/algorithms/polynomial-matrix 23 | 24 | 25 | pkgincludesub_HEADERS = \ 26 | matpoly-add-domain.h \ 27 | matpoly-mult-naive.h \ 28 | matpoly-mult-fft.h \ 29 | matpoly-mult-kara.h \ 30 | matpoly-mult-fft-wordsize.inl \ 31 | matpoly-mult-fft-wordsize-fast.inl \ 32 | matpoly-mult-fft-wordsize-three-primes.inl \ 33 | matpoly-mult-fft-multiprecision.inl \ 34 | matpoly-mult-fft-recint.inl \ 35 | polynomial-matrix-domain.h \ 36 | fft.h \ 37 | fft-utils.h \ 38 | fft-floating.inl \ 39 | fft-integral.inl \ 40 | fft-simd.h \ 41 | order-basis.h 42 | -------------------------------------------------------------------------------- /linbox/algorithms/sigmabasis.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup algorithms 23 | @defgroup sigmabase Sigma-basis 24 | @brief NO DOC YET 25 | 26 | 27 | */ 28 | 29 | // vim:syntax=doxygen 30 | -------------------------------------------------------------------------------- /linbox/algorithms/wiedemann.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup algorithms 23 | @defgroup wiedemann Wiedemann 24 | @brief NO DOC YET 25 | 26 | 27 | */ 28 | 29 | // vim:syntax=doxygen 30 | -------------------------------------------------------------------------------- /linbox/blackbox/random-matrix-traits.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010 LinBox 2 | * Author: Zhendong Wan 3 | * 4 | * 5 | * ========LICENCE======== 6 | * This file is part of the library LinBox. 7 | * 8 | * LinBox is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * ========LICENCE======== 22 | */ 23 | 24 | #ifndef __LINBOX_random_matrix_traits_H 25 | #define __LINBOX_random_matrix_traits_H 26 | 27 | namespace LinBox 28 | { 29 | 30 | template 31 | class RandomMatrixTraits{ 32 | public: 33 | typedef Matrix value_type; 34 | }; 35 | } 36 | 37 | #endif // __LINBOX_random_matrix_traits_H 38 | 39 | // Local Variables: 40 | // mode: C++ 41 | // tab-width: 4 42 | // indent-tabs-mode: nil 43 | // c-basic-offset: 4 44 | // End: 45 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 46 | -------------------------------------------------------------------------------- /linbox/blackbox/submatrix-traits.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010 LinBox 2 | * Written by Zhendong Wan 3 | * 4 | * 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | #ifndef __LINBOX_submatrix_traits_H 25 | #define __LINBOX_submatrix_traits_H 26 | 27 | #include "linbox/blackbox/submatrix.h" 28 | 29 | 30 | namespace LinBox 31 | { 32 | 33 | template 34 | class SubMatrixTraits; 35 | 36 | template 37 | class SubMatrixTraits > { 38 | 39 | public: 40 | 41 | typedef Submatrix > value_type; 42 | }; 43 | 44 | template 45 | class SubMatrixTraits > > { 46 | 47 | public: 48 | 49 | typedef Submatrix > value_type; 50 | }; 51 | 52 | 53 | } 54 | 55 | #endif //__LINBOX_submatrix_traits_H 56 | 57 | // Local Variables: 58 | // mode: C++ 59 | // tab-width: 4 60 | // indent-tabs-mode: nil 61 | // c-basic-offset: 4 62 | // End: 63 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 64 | -------------------------------------------------------------------------------- /linbox/config-blas.h: -------------------------------------------------------------------------------- 1 | /* config-blas.h 2 | * Copyright (C) 2005 Pascal Giorgi 3 | * 2007 Clement Pernet 4 | * Written by Pascal Giorgi 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | 26 | #ifndef __LINBOX_config_blas_H 27 | #define __LINBOX_config_blas_H 28 | 29 | #include 30 | #include 31 | 32 | #ifdef __FFLASFFPACK_HAVE_BLAS 33 | #define __LINBOX_HAVE_BLAS 1 34 | #endif 35 | 36 | #ifdef __FFLASFFPACK_HAVE_CBLAS 37 | #define __LINBOX_HAVE_CBLAS 1 38 | #endif 39 | 40 | #ifdef __FFLASFFPACK_HAVE_LAPACK 41 | #define __LINBOX_HAVE_LAPACK 1 42 | #endif 43 | 44 | #ifdef __FFLASFFPACK_HAVE_CLAPACK 45 | #define __LINBOX_HAVE_CLAPACK 1 46 | #endif 47 | 48 | #endif //__LINBOX_config_blas_H 49 | 50 | // Local Variables: 51 | // mode: C++ 52 | // tab-width: 4 53 | // indent-tabs-mode: nil 54 | // c-basic-offset: 4 55 | // End: 56 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 57 | -------------------------------------------------------------------------------- /linbox/dummy.C: -------------------------------------------------------------------------------- 1 | /* linbox/dummy.C 2 | * Copyright (C) 1994-1997 Givaro Team 3 | * 4 | * Written by Bradford Hovinen 5 | * 6 | * ------------------------------------ 7 | * 8 | * 9 | * ========LICENCE======== 10 | * This file is part of the library LinBox. 11 | * 12 | * LinBox is free software: you can redistribute it and/or modify 13 | * it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * 17 | * This library is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | * Lesser General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Lesser General Public 23 | * License along with this library; if not, write to the Free Software 24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 25 | * ========LICENCE======== 26 | *. 27 | */ 28 | 29 | #include "linbox-config.h" 30 | 31 | // This file contains something to fool libtool into building the library 32 | // correctly 33 | 34 | #pragma GCC diagnostic ignored "-Wunused-variable" 35 | static int dummy; 36 | 37 | void foobar(){} 38 | 39 | // Local Variables: 40 | // mode: C++ 41 | // tab-width: 4 42 | // indent-tabs-mode: nil 43 | // c-basic-offset: 4 44 | // End: 45 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 46 | -------------------------------------------------------------------------------- /linbox/element/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # This file is part of LinBox 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # 6 | LinBox is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # ========LICENCE======== 20 | #/ 21 | 22 | pkgincludesubdir=$(pkgincludedir)/element 23 | 24 | EXTRA_DIST= \ 25 | element.doxy 26 | 27 | pkgincludesub_HEADERS= \ 28 | abstract.h \ 29 | archetype.h \ 30 | envelope.h \ 31 | gmp-rational.h 32 | -------------------------------------------------------------------------------- /linbox/element/element.doxy: -------------------------------------------------------------------------------- 1 | /* Copyright (c) LinBox 2 | * ========LICENCE======== 3 | * This file is part of the library LinBox. 4 | * 5 | * LinBox is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * ========LICENCE======== 19 | *. 20 | */ 21 | 22 | 23 | /** \ingroup linbox 24 | \defgroup element element 25 | 26 | \brief The interface for field and ring element types. 27 | 28 | The interface requirements are minimal and are specified 29 | in LinBox::ElementArchetype. 30 | 31 | \note Developers: 32 | Your element type may be almost any primitive type or defined class. 33 | To support the field archetype there is also a LinBox::ElementAbstract 34 | and LinBox::ElementEnvelope. 35 | 36 | @see \ref Archetypes 37 | 38 | */ 39 | 40 | // vim:syn=doxygen 41 | -------------------------------------------------------------------------------- /linbox/field/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | pkgincludesubdir=$(pkgincludedir)/field 23 | 24 | BASIC_HDRS = \ 25 | field-documentation.h \ 26 | field-traits.h \ 27 | rebind.h \ 28 | abstract.h \ 29 | archetype.h \ 30 | envelope.h \ 31 | param-fuzzy.h \ 32 | gmp-rational.h \ 33 | gf2.h \ 34 | gf2.inl \ 35 | hom.h \ 36 | map.h \ 37 | multimod-field.h 38 | 39 | pkgincludesub_HEADERS = \ 40 | $(BASIC_HDRS) 41 | 42 | EXTRA_DIST = \ 43 | field.doxy 44 | -------------------------------------------------------------------------------- /linbox/field/field.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** \ingroup linbox 23 | * \defgroup field field 24 | * 25 | * \brief LinBox fields, field wrappers, field construction tools. 26 | * 27 | * LinBox fields implement the concept 28 | * which is specified in the field archetype. 29 | * 30 | * Some implement a basic ring concept rather than a field 31 | * (inv and div are partial functions). Ring representations with 32 | * additional functions are also found in the \ref ring directory. 33 | * 34 | */ 35 | 36 | // vim:syn=doxygen 37 | -------------------------------------------------------------------------------- /linbox/field/gf2.inl: -------------------------------------------------------------------------------- 1 | /* linbox/field/gf2.inl 2 | * Copyright (C) 2003 Bradford Hovinen 3 | * 4 | * Written by Bradford Hovinen, Dumas, bds 5 | * 6 | * ------------------------------------ 7 | * 8 | * 9 | * ========LICENCE======== 10 | * This file is part of the library LinBox. 11 | * 12 | * LinBox is free software: you can redistribute it and/or modify 13 | * it under the terms of the GNU Lesser General Public 14 | * License as published by the Free Software Foundation; either 15 | * version 2.1 of the License, or (at your option) any later version. 16 | * 17 | * This library is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | * Lesser General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Lesser General Public 23 | * License along with this library; if not, write to the Free Software 24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 25 | * ========LICENCE======== 26 | *. 27 | */ 28 | 29 | #ifndef __LINBOX_field_gf2_INL 30 | #define __LINBOX_field_gf2_INL 31 | 32 | #include 33 | #include 34 | 35 | #include //isdigit 36 | 37 | template 38 | std::ostream& afficheVector (std::ostream& o, const Vector& C) 39 | { 40 | for(typename Vector::const_iterator refs = C.begin(); 41 | refs != C.end() ; 42 | ++refs ) 43 | o << (*refs) << " " ; 44 | return o; 45 | } 46 | 47 | 48 | 49 | #endif // __LINBOX_field_gf2_INL 50 | 51 | // Local Variables: 52 | // mode: C++ 53 | // tab-width: 4 54 | // indent-tabs-mode: nil 55 | // c-basic-offset: 4 56 | // End: 57 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 58 | -------------------------------------------------------------------------------- /linbox/field/integers.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /*! @ingroup ring 23 | * @defgroup integers Integers 24 | * LinBox integer representation and operations. 25 | * 26 | * LinBox integers come from Givaro which uses GMP. This ensures fastest 27 | * operations. 28 | * 29 | * LinBox provides : 30 | * - LinBox::Integer is the Givaro representation of an integer (Givaro::Integer). 31 | * - LinBox::integer is a synonym 32 | * 33 | * The Ring of integers is provided by Givaro: Givaro::ZRing 34 | * 35 | * other use of integers ? 36 | * 37 | * @warning due to the construction of Givaro, you should always prefer to 38 | * group operations as in the example : 39 | \code 40 | Integer a=1,b=1,c=1; 41 | c += a * b ; // slow 42 | axpyin(c,a,b) ; // faster 43 | \endcode 44 | * @see Givaro for documentation. 45 | */ 46 | 47 | /** @ingroup integers 48 | * @defgroup primes Primes 49 | * @brief NO DOC 50 | */ 51 | 52 | // vim:syn=doxygen 53 | -------------------------------------------------------------------------------- /linbox/field/rebind.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 LinBox 2 | * Written by Jean-Guillaume Dumas 3 | * 4 | * 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | #ifndef __LINBOX_rebind_H 26 | #define __LINBOX_rebind_H 27 | 28 | namespace LinBox 29 | { 30 | 31 | /** \brief used in support of Hom, MatrixHom 32 | 33 | Helps define rebind for vector types. See matrix/sparse-matrix.h for example of use. 34 | */ 35 | template 36 | struct Rebind 37 | { 38 | typedef typename XXX::template rebind::other other; 39 | }; 40 | 41 | } 42 | #endif //__LINBOX_rebind_H 43 | 44 | // Local Variables: 45 | // mode: C++ 46 | // tab-width: 4 47 | // indent-tabs-mode: nil 48 | // c-basic-offset: 4 49 | // End: 50 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 51 | -------------------------------------------------------------------------------- /linbox/iterators/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # This file is part of LinBox 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # 6 | # LinBox is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # ========LICENCE======== 20 | #/ 21 | 22 | pkgincludesubdir=$(pkgincludedir)/iterators 23 | 24 | pkgincludesub_HEADERS=\ 25 | blackbox-symmetrize-iterator.h \ 26 | blackbox-symmetric-iterator.h 27 | -------------------------------------------------------------------------------- /linbox/linbox.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /*+ \defgroup linbox LinBox 23 | * 24 | * \brief This is the LinBox library proper. 25 | * 26 | * 27 | */ 28 | 29 | /*! @namespace LinBox 30 | * @brief Namespace in which all linbox code resides. 31 | * 32 | * The subdirectories of \c linbox/ contain the template source code for all 33 | * the LinBox functionality. See the Modules list for 34 | * the documentation of the main parts of linbox. 35 | * 36 | * @warning The timer comes from Givaro and lives in its anonymous namespace. 37 | */ 38 | 39 | // vim:syn=doxygen 40 | -------------------------------------------------------------------------------- /linbox/matrix/dense-matrix.doxy: -------------------------------------------------------------------------------- 1 | // Copyright 2014 LinBox. See COPYING for licence information. 2 | /* 3 | * Written by Brice Boyer (briceboyer) 4 | 5 | * ========LICENCE======== 6 | * This file is part of the library LinBox. 7 | * 8 | * LinBox is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * ========LICENCE======== 22 | */ 23 | 24 | /** \ingroup matrix 25 | * \defgroup densematrix Dense Matrix 26 | * \brief These are dense matrix reprensentations 27 | * 28 | * NO DOC YET 29 | * 30 | */ 31 | 32 | // vim:syn=doxygen 33 | -------------------------------------------------------------------------------- /linbox/matrix/densematrix/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 the LinBox group 2 | # written by BB 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # 6 | # LinBox is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # ========LICENCE======== 20 | 21 | 22 | 23 | pkgincludesubdir=$(pkgincludedir)/matrix/densematrix 24 | 25 | 26 | pkgincludesub_HEADERS = \ 27 | blas-matrix.h \ 28 | blas-matrix.inl \ 29 | blas-matrix-iterator.h\ 30 | blas-submatrix.h \ 31 | blas-submatrix.inl \ 32 | blas-transposed-matrix.h \ 33 | blas-matrix-multimod.h 34 | 35 | 36 | -------------------------------------------------------------------------------- /linbox/matrix/matrix-domain.doxy: -------------------------------------------------------------------------------- 1 | // Copyright 2014 LinBox. See COPYING for licence information. 2 | /* 3 | * Written by Brice Boyer (briceboyer) 4 | 5 | * ========LICENCE======== 6 | * This file is part of the library LinBox. 7 | * 8 | * LinBox is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * ========LICENCE======== 22 | */ 23 | 24 | /** \ingroup matrix 25 | * \defgroup matrixdomain Matrix Domain 26 | * \brief Matrix domain operations 27 | * 28 | * NO DOC YET 29 | * 30 | */ 31 | 32 | // vim:syn=doxygen 33 | -------------------------------------------------------------------------------- /linbox/matrix/matrix-iterators.doxy: -------------------------------------------------------------------------------- 1 | // Copyright 2014 LinBox. See COPYING for licence information. 2 | /* 3 | * Written by: 4 | * Brice Boyer (briceboyer) 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | /*! @ingroup matrix 26 | * @defgroup matrixiterators Iterators 27 | * @brief NO DOC YET 28 | * 29 | * Matrices in general may omit one of the iterators, either the row iterator or 30 | * the column iterator. This is useful for, e.g. sparse matrices that are 31 | * represented by sparse row vectors, since column vectors are computationally 32 | * expensive to compute without directly building the transpose of the matrix. 33 | * 34 | * \par RowIterator 35 | * 36 | * \par ColIterator 37 | * 38 | * \par Iterator 39 | * 40 | * \par IndexedIterator 41 | * 42 | */ 43 | 44 | 45 | // vim:syn=doxygen 46 | -------------------------------------------------------------------------------- /linbox/matrix/matrixdomain/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 the LinBox group 2 | # written by BB 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # 6 | # LinBox is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # ========LICENCE======== 20 | 21 | 22 | 23 | pkgincludesubdir=$(pkgincludedir)/matrix/matrixdomain 24 | 25 | 26 | OCL_HDRS = \ 27 | opencl-domain.h \ 28 | opencl-domain.inl \ 29 | opencl-domain-util.inl \ 30 | opencl-domain-memory.inl \ 31 | opencl-domain-factory.h 32 | 33 | # if LINBOX_HAVE_OCL // we include them anyway. (for make dist when OCL not available) 34 | USE_OCL_HDRS = $(OCL_HDRS) 35 | # endif 36 | 37 | 38 | 39 | pkgincludesub_HEADERS = \ 40 | matrix-domain.h \ 41 | matrix-domain.inl \ 42 | matrix-domain-gf2.h \ 43 | blas-matrix-domain.h \ 44 | blas-matrix-domain-mul.inl\ 45 | blas-matrix-domain.inl \ 46 | plain-domain.h \ 47 | $(USE_OCL_HDRS) 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /linbox/matrix/permutation-matrix.doxy: -------------------------------------------------------------------------------- 1 | // Copyright 2014 LinBox. See COPYING for licence information. 2 | /* 3 | * Written by Brice Boyer (briceboyer) 4 | 5 | * ========LICENCE======== 6 | * This file is part of the library LinBox. 7 | * 8 | * LinBox is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * ========LICENCE======== 22 | */ 23 | 24 | /** \ingroup matrix 25 | * \defgroup permutationmatrix Permutation Matrix 26 | * \brief These are permutation matrix reprensentations 27 | * 28 | * NO DOC YET 29 | * 30 | */ 31 | 32 | // vim:syn=doxygen 33 | -------------------------------------------------------------------------------- /linbox/matrix/sliced3.doxy: -------------------------------------------------------------------------------- 1 | // Copyright 2014 LinBox. See COPYING for licence information. 2 | /* 3 | * Written by Brice Boyer (briceboyer) 4 | 5 | * ========LICENCE======== 6 | * This file is part of the library LinBox. 7 | * 8 | * LinBox is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * ========LICENCE======== 22 | */ 23 | 24 | /** \ingroup matrix 25 | * \defgroup sliced3 Sliced Matrix 26 | * \brief These are files related to a special bitsliced GF(3) representation 27 | * 28 | * NO DOC YET 29 | * 30 | */ 31 | 32 | // vim:syn=doxygen 33 | -------------------------------------------------------------------------------- /linbox/matrix/sliced3.h: -------------------------------------------------------------------------------- 1 | /* linbox/matrix/sparse-matrix.h 2 | * Copyright (C) 2013 the LinBox 3 | * 4 | * Written by : 5 | * bsy 6 | * 7 | * ========LICENCE======== 8 | * This file is part of the library LinBox. 9 | * 10 | * LinBox is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU Lesser General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2.1 of the License, or (at your option) any later version. 14 | * 15 | * This library is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | * Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public 21 | * License along with this library; if not, write to the Free Software 22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 23 | * ========LICENCE======== 24 | */ 25 | 26 | /*! @file matrix/sliced3.h 27 | * @ingroup matrix 28 | */ 29 | 30 | #ifndef __LINBOX_matrix_sliced3_H 31 | #define __LINBOX_matrix_sliced3_H 32 | 33 | #include "linbox/matrix/sliced3/dense-sliced.h" 34 | #include "linbox/matrix/sliced3/sliced-domain.h" 35 | 36 | #endif // __LINBOX_matrix_sliced3_H 37 | 38 | // Local Variables: 39 | // mode: C++ 40 | // tab-width: 4 41 | // indent-tabs-mode: nil 42 | // c-basic-offset: 4 43 | // End: 44 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 45 | -------------------------------------------------------------------------------- /linbox/matrix/sliced3/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | pkgincludesubdir=$(pkgincludedir)/matrix/sliced3 21 | 22 | 23 | pkgincludesub_HEADERS = \ 24 | dense-matrix.h \ 25 | dense-sliced.h \ 26 | dense-sliced.inl \ 27 | sliced-domain.h \ 28 | sliced-stepper.h \ 29 | submat-iterator.h 30 | 31 | -------------------------------------------------------------------------------- /linbox/matrix/sliced3/sliced-stepper.h: -------------------------------------------------------------------------------- 1 | #ifndef __SLICED_STEPPER_H 2 | #define __SLICED_STEPPER_H 3 | 4 | #include "dense-sliced.h" 5 | #include "sliced-domain.h" 6 | #include 7 | 8 | namespace LinBox{ 9 | 10 | // To fill a sliced vector 11 | struct stepper { 12 | 13 | typedef SlicedDomain > Domain; 14 | typedef Sliced Matrix; 15 | typedef Matrix::Scalar Scalar; 16 | typedef Matrix::RawIterator RawIterator; 17 | typedef Matrix::SlicedUnit SlicedUnit; 18 | 19 | Matrix &_A; 20 | RawIterator _r; 21 | size_t _i; 22 | const static size_t SIZE = sizeof(Domain::Word_T)*8; 23 | Scalar _store[SIZE]; 24 | 25 | stepper(Matrix & A) : _A(A), _r(_A.rawBegin()), _i(SIZE-1) { } 26 | 27 | virtual inline void flush(){ 28 | //_r.pinfo(); 29 | //std::cerr << std::endl; 30 | SlicedUnit &t = (*_r); 31 | t.zero(); 32 | for(size_t i = _i + 1; i < SIZE; ++i){ 33 | //std::cerr << (int)_store[i] << " "; 34 | /* 35 | t <<= 1; 36 | if(_store[i] > 1) t |= 1; 37 | else t.b0 |= _store[i]; 38 | */ 39 | t <<= 1; 40 | t.b1 |= ((_store[i] & 2) >> 1); 41 | t.b0 |= ((_store[i] & 1) | t.b1); 42 | //std::cerr << (int)t.b0 << " & " << (int)t.b1 << std::endl; 43 | } 44 | //std::cerr << "----------------" << std::endl; 45 | _i = SIZE-1; 46 | ++_r; 47 | } 48 | 49 | inline void step(Scalar e) { 50 | //std::cerr << (int)e << " "; 51 | _store[_i--] = e; 52 | if(_i > SIZE) flush(); 53 | } 54 | 55 | inline void row(){ 56 | if(_i != SIZE-1) flush(); 57 | } 58 | 59 | }; 60 | 61 | } // LinBox 62 | 63 | #endif // __SLICED_STEPPER_H 64 | 65 | // Local Variables: 66 | // mode: C++ 67 | // tab-width: 4 68 | // indent-tabs-mode: nil 69 | // c-basic-offset: 4 70 | // End: 71 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 72 | -------------------------------------------------------------------------------- /linbox/matrix/slicedpolynomialmatrix/SlicedPolynomialMatrixAddSub.h: -------------------------------------------------------------------------------- 1 | #ifndef __LINBOX_matrix_SlicedPolynomialMatrix_SlicedPolynomialMatrixAddSub_H 2 | #define __LINBOX_matrix_SlicedPolynomialMatrix_SlicedPolynomialMatrixAddSub_H 3 | 4 | #include 5 | #include "linbox/matrix/matrixdomain/blas-matrix-domain.h" 6 | #include "linbox/matrix/slicedpolynomialmatrix/SlicedPolynomialMatrix.h" 7 | 8 | namespace LinBox 9 | { 10 | /* internal 11 | * Adding two matrices 12 | */ 13 | template< class Field, class Operand1, class Operand2, class Operand3> 14 | class SlicedPolynomialMatrixAdd 15 | { 16 | public: 17 | Operand1 &operator() (const Field &F, Operand1 &C, const Operand2 &A, const Operand3 &B) const; 18 | 19 | }; 20 | 21 | /* internal 22 | * Substracting two matrices 23 | */ 24 | template< class Field, class Operand1, class Operand2, class Operand3> 25 | class SlicedPolynomialMatrixSub 26 | { 27 | public: 28 | Operand1 &operator() (const Field &F, Operand1 &C, const Operand2 &A, const Operand3 &B) const; 29 | 30 | }; 31 | 32 | //! C += A 33 | template< class Field, class Operand1, class Operand2> 34 | class SlicedPolynomialMatrixAddin 35 | { 36 | public: 37 | Operand1 &operator() (const Field &F, Operand1 &C, const Operand2 &A) const; 38 | 39 | }; 40 | 41 | //! C -= A 42 | template< class Field, class Operand1, class Operand2> 43 | class SlicedPolynomialMatrixSubin 44 | { 45 | public: 46 | Operand1 &operator() (const Field &F, Operand1 &C, const Operand2 &A) const; 47 | 48 | }; 49 | } /* end of namespace LinBox */ 50 | 51 | #include "SlicedPolynomialMatrixAddSub.inl" 52 | 53 | #endif 54 | 55 | // Local Variables: 56 | // mode: C++ 57 | // tab-width: 4 58 | // indent-tabs-mode: nil 59 | // c-basic-offset: 4 60 | // End: 61 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 62 | -------------------------------------------------------------------------------- /linbox/matrix/slicedpolynomialmatrix/SlicedPolynomialMatrixMulKaratsuba.h: -------------------------------------------------------------------------------- 1 | #ifndef __LINBOX_matrix_SlicedPolynomialMatrix_SlicedPolynomialMatrixMulKaratsuba_H 2 | #define __LINBOX_matrix_SlicedPolynomialMatrix_SlicedPolynomialMatrixMulKaratsuba_H 3 | 4 | #include "SlicedPolynomialMatrix.h" 5 | #include "SlicedPolynomialMatrixAddSub.h" 6 | 7 | namespace LinBox 8 | { 9 | template< class Field, class Operand1, class Operand2, class Operand3> 10 | class SlicedPolynomialMatrixMulKaratsuba 11 | { 12 | private: 13 | typedef Operand1::IntField IntField; 14 | typedef BlasMatrix Matrix; 15 | typedef std::vector> vec; 16 | typedef Operand1::polynomial polynomial; 17 | vec& modulo(vec& C, int n, polynomial irreducible); 18 | vec& karatsuba(IntField& F, vec& A, vec& B, vec& C); 19 | public: 20 | Operand1 &operator() (const Field &GF, Operand1 &C, const Operand2 &A, const Operand3 &B) const; 21 | }; 22 | } /* end of namespace LinBox */ 23 | 24 | #include "SlicedPolynomialMatrixMulKaratsuba.inl" 25 | 26 | #endif 27 | // Local Variables: 28 | // mode: C++ 29 | // tab-width: 4 30 | // indent-tabs-mode: nil 31 | // c-basic-offset: 4 32 | // End: 33 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 34 | -------------------------------------------------------------------------------- /linbox/matrix/slicedpolynomialmatrix/SlicedPolynomialMatrixMulToomCook.h: -------------------------------------------------------------------------------- 1 | #ifndef __LINBOX_matrix_SlicedPolynomialMatrix_SlicedPolynomialMatrixMulToomCook_H 2 | #define __LINBOX_matrix_SlicedPolynomialMatrix_SlicedPolynomialMatrixMulToomCook_H 3 | 4 | #include "SlicedPolynomialMatrix.h" 5 | 6 | namespace LinBox 7 | { 8 | template< class Field, class Vector3, class Vector1, class Vector2> 9 | class SlicedPolynomialMatrixMulToomCook 10 | { 11 | private: 12 | typedef SlicedPolynomialMatrixtoBlasMatrix conversionAtoAm; 13 | typedef SlicedPolynomialMatrixtoBlasMatrix conversionBtoBm; 14 | typedef Vector3::IntField IntField; 15 | typedef BlasMatrix Matrix; 16 | typedef BlasMatrixtoSlicedPolynomialMatrix conversionCmtoC; 17 | typedef Vector3::polynomial polynomial; 18 | Matrix& EvaluationInterpolationMatrices (Matrix& TC, Matrix& iTC); 19 | template 20 | Matrix& mul (IntField& F, Matrix& CMatBloc, const Matrix& AMatBloc, const Matrix& BMatBloc, 21 | const size_t m, const size_t k, const size_t n, const size_t e, polynomial irreducible); 22 | public: 23 | Operand1 &operator() (const Field &GF, Operand1 &C, const Operand2 &A, const Operand3 &B) const; 24 | }; 25 | } /* end of namespace LinBox */ 26 | 27 | #include "SlicedPolynomialMatrixMulToomCook.inl" 28 | 29 | #endif 30 | // Local Variables: 31 | // mode: C++ 32 | // tab-width: 4 33 | // indent-tabs-mode: nil 34 | // c-basic-offset: 4 35 | // End: 36 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 37 | -------------------------------------------------------------------------------- /linbox/matrix/sparse-matrix.doxy: -------------------------------------------------------------------------------- 1 | // Copyright 2014 LinBox. See COPYING for licence information. 2 | /* 3 | * Written by Brice Boyer (briceboyer) 4 | 5 | * ========LICENCE======== 6 | * This file is part of the library LinBox. 7 | * 8 | * LinBox is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * ========LICENCE======== 22 | */ 23 | 24 | /** \ingroup matrix 25 | * \defgroup sparsematrix Sparse Matrix 26 | * \brief These are sparse matrix reprensentations 27 | * 28 | * NO DOC YET 29 | * 30 | */ 31 | 32 | // vim:syn=doxygen 33 | -------------------------------------------------------------------------------- /linbox/matrix/sparsematrix/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | pkgincludesubdir=$(pkgincludedir)/matrix/sparsematrix 23 | 24 | 25 | pkgincludesub_HEADERS = \ 26 | sparse-associative-vector.h \ 27 | sparse-associative-vector.inl \ 28 | sparse-coo-matrix.h \ 29 | sparse-coo-implicit-matrix.h \ 30 | sparse-csr-matrix.h \ 31 | sparse-domain.h \ 32 | sparse-ell-matrix.h \ 33 | sparse-ellr-matrix.h \ 34 | sparse-generic.h \ 35 | sparse-generic.inl \ 36 | sparse-hyb-matrix.h \ 37 | sparse-map-map-matrix.h \ 38 | sparse-map-map-matrix.inl \ 39 | sparse-parallel-vector.h \ 40 | sparse-parallel-vector.inl \ 41 | sparse-sequence-vector.h \ 42 | sparse-sequence-vector.inl \ 43 | sparse-tpl-matrix.h \ 44 | sparse-tpl-matrix.inl \ 45 | sparse-tpl-matrix-omp.h \ 46 | sparse-tpl-matrix-omp.inl \ 47 | read-write-sparse.h \ 48 | triples-coord.h \ 49 | read-write-sparse.inl 50 | 51 | # sparse-coo-1-matrix.h \ 52 | # sparse-csr-1-matrix.h \ 53 | # sparse-ellr-1-matrix.h \ 54 | # sparse-bcsr-matrix.h \ 55 | # sparse-dia-matrix.h \ 56 | # sparse-tpl-matrix.h \ 57 | # sparse-csc-matrix.h \ 58 | # 59 | -------------------------------------------------------------------------------- /linbox/polynomial/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017 the LinBox group 2 | # This file is part of LinBox 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | #/ 20 | 21 | pkgincludesubdir=$(pkgincludedir)/polynomial 22 | 23 | EXTRA_DIST= \ 24 | polynomial.doxy 25 | 26 | pkgincludesub_HEADERS= \ 27 | dense-polynomial.h 28 | -------------------------------------------------------------------------------- /linbox/polynomial/polynomial.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /*! @ingroup ring 23 | * @defgroup polynomials Polynomials 24 | * @brief NO DOC YET 25 | */ 26 | 27 | // vim:syn=doxygen 28 | -------------------------------------------------------------------------------- /linbox/randiter/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | AM_CPPFLAGS=-I$(top_srcdir) 22 | AM_CXXFLAGS=$(LINBOX_CXXFLAGS) $(FFLAS_FFPACK_CFLAGS) $(LINBOX_DEPS_CFLAGS) 23 | LDADD=$(LINBOX_DEPS_LIBS) $(FFLAS_FFPACK_LIBS) $(LINBOX_LDFLAGS) 24 | 25 | pkgincludesubdir=$(pkgincludedir)/randiter 26 | 27 | BASIC_HDRS = \ 28 | abstract.h \ 29 | archetype.h \ 30 | envelope.h \ 31 | gmp-rational.h \ 32 | param-fuzzy.h \ 33 | modular-balanced.h \ 34 | modular-crooked.h \ 35 | gf2.h \ 36 | mersenne-twister.h \ 37 | random-prime.h \ 38 | gmp-random-prime.h \ 39 | random-fftprime.h \ 40 | multimod-randomprime.h 41 | 42 | NTL_HDRS = ntl-zz.h 43 | 44 | if LINBOX_HAVE_NTL 45 | USE_NTL_HDRS = $(NTL_HDRS) 46 | endif 47 | 48 | pkgincludesub_HEADERS = \ 49 | $(BASIC_HDRS) \ 50 | $(USE_NTL_HDRS) 51 | 52 | EXTRA_DIST = \ 53 | $(NTL_HDRS) \ 54 | randiter.doxy \ 55 | archetype.doxy \ 56 | randiter-wrappers.doxy 57 | 58 | noinst_LTLIBRARIES = libranditer.la 59 | 60 | libranditer_la_SOURCES = \ 61 | mersenne-twister.C 62 | 63 | -------------------------------------------------------------------------------- /linbox/randiter/archetype.doxy: -------------------------------------------------------------------------------- 1 | /* Copyright (c) LinBox 2 | * ========LICENCE======== 3 | * This file is part of the library LinBox. 4 | * 5 | * LinBox is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * ========LICENCE======== 19 | *. 20 | */ 21 | 22 | 23 | /*! \page randomIGA Random Iterator Generator Archetype 24 | 25 | The \ref LinBox random iterator generator archetype defines the random 26 | iterator generator common object interface. 27 | 28 | @see \ref Archetypes 29 | 30 | \brief @link Archetypes Archetype@endlink for implementing the %LinBox 31 | \ref randomIGA common object interface. 32 | */ 33 | //@{ 34 | //@Include: archetype.h 35 | //@Include: abstract.h 36 | //@Include: envelope.h 37 | //@} 38 | 39 | // vim:syn=doxygen 40 | -------------------------------------------------------------------------------- /linbox/randiter/gmp-random-prime.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010 LinBox 2 | * 3 | * 4 | * ========LICENCE======== 5 | * This file is part of the library LinBox. 6 | * 7 | * LinBox is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | * ========LICENCE======== 21 | */ 22 | 23 | #ifndef __LINBOX_gmp_random_prime_H 24 | #define __LINBOX_gmp_random_prime_H 25 | 26 | #include "linbox/randiter/random-prime.h" 27 | 28 | namespace LinBox 29 | { 30 | /** \brief generating random prime integers, using the gmp library. 31 | * via primeiterator 32 | */ 33 | 34 | class GmpRandomPrime : public PrimeIterator<> { 35 | public: 36 | GmpRandomPrime(const uint64_t bits = 23, const uint64_t seed = 0) : 37 | PrimeIterator(bits,seed) {} 38 | 39 | inline integer randomPrime() 40 | { 41 | this->operator++(); return this->operator*(); 42 | } 43 | 44 | inline integer& randomPrime( integer& p ) 45 | { 46 | return p=std::move(randomPrime()); 47 | } 48 | 49 | }; 50 | } 51 | 52 | #endif //__LINBOX_gmp_random_prime_H 53 | 54 | // Local Variables: 55 | // mode: C++ 56 | // tab-width: 4 57 | // indent-tabs-mode: nil 58 | // c-basic-offset: 4 59 | // End: 60 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 61 | -------------------------------------------------------------------------------- /linbox/randiter/lidia.h: -------------------------------------------------------------------------------- 1 | /* linbox/randiter/lidia.h 2 | * Copyright (C) 2002 Pascal Giorgi 3 | * 4 | * Written by Pascal Giorgi 5 | * 6 | * 7 | * ========LICENCE======== 8 | * This file is part of the library LinBox. 9 | * 10 | * LinBox is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU Lesser General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2.1 of the License, or (at your option) any later version. 14 | * 15 | * This library is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | * Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public 21 | * License along with this library; if not, write to the Free Software 22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 23 | * ========LICENCE======== 24 | *. 25 | */ 26 | 27 | #ifndef __LINBOX_randiter_lidia_H 28 | #define __LINBOX_randiter_lidia_H 29 | 30 | #include "linbox/randiter/lidia-gfq.h" 31 | 32 | #endif // __LINBOX_randiter_lidia_H 33 | 34 | // Local Variables: 35 | // mode: C++ 36 | // tab-width: 4 37 | // indent-tabs-mode: nil 38 | // c-basic-offset: 4 39 | // End: 40 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 41 | -------------------------------------------------------------------------------- /linbox/randiter/randiter-wrappers.doxy: -------------------------------------------------------------------------------- 1 | /* Copyright (c) LinBox 2 | * ========LICENCE======== 3 | * This file is part of the library LinBox. 4 | * 5 | * LinBox is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * ========LICENCE======== 19 | *. 20 | */ 21 | 22 | 23 | /** \page randomFEGW Random field element generator wrappers 24 | 25 | @see \ref Fields 26 | @see Field Wrappers 27 | 28 | @brief Wrappers to make \ref LinBox random field element generators. 29 | */ 30 | 31 | // vim:syn=doxygen 32 | -------------------------------------------------------------------------------- /linbox/randiter/randiter.doxy: -------------------------------------------------------------------------------- 1 | // Copyright 2010 LinBox. See COPYING for lincence information. 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /**\ingroup linbox 23 | \defgroup randiter randiter 24 | 25 | \brief Random Iterator Generators 26 | 27 | All LinBox random iterator generators must implement the random iterator 28 | generator common object interface as it is defined in the random iterator 29 | generator \link LinBox::RandIterArchetype archetype\endlink. This interface 30 | consists of the methods required of all LinBox random iterator generators. 31 | 32 | @see \ref Archetypes 33 | 34 | */ 35 | //@{ 36 | //@Include *.h 37 | //@} 38 | 39 | // vim:syn=doxygen 40 | -------------------------------------------------------------------------------- /linbox/ring/Makefile.am: -------------------------------------------------------------------------------- 1 | # This file is part of the library LinBox. 2 | # 3 | # LinBox is free software: you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public 5 | # License as published by the Free Software Foundation; either 6 | # version 2.1 of the License, or (at your option) any later version. 7 | # 8 | # This library is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public 14 | # License along with this library; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | # ========LICENCE======== 17 | 18 | 19 | 20 | pkgincludesubdir=$(pkgincludedir)/ring 21 | 22 | SUBDIRS=ntl modular 23 | 24 | BASIC_HDRS = \ 25 | ring-interface.h \ 26 | polynomial-ring.h \ 27 | modular.h \ 28 | local-pir-modular.h \ 29 | pir-modular-int32.h \ 30 | local2_32.h \ 31 | abstract.h \ 32 | archetype.h \ 33 | envelope.h \ 34 | polynomial-local-x.h 35 | 36 | NTL_HDRS = \ 37 | ntl.h \ 38 | pid-ntl-zz_p.h \ 39 | pir-ntl-zz_p.h 40 | 41 | if LINBOX_HAVE_NTL 42 | USE_NTL_HDRS = $(NTL_HDRS) 43 | endif 44 | 45 | pkgincludesub_HEADERS = \ 46 | $(BASIC_HDRS) \ 47 | $(USE_NTL_HDRS) 48 | 49 | EXTRA_DIST = \ 50 | $(NTL_HDRS) \ 51 | ring.doxy \ 52 | polynomial.doxy \ 53 | ntl.doxy 54 | -------------------------------------------------------------------------------- /linbox/ring/modular/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | pkgincludesubdir=$(pkgincludedir)/ring/modular 23 | 24 | BASIC_HDRS = \ 25 | modular-unsigned.h \ 26 | modular-int32.h \ 27 | modular-int64.h \ 28 | modular-short.h \ 29 | modular-byte.h \ 30 | modular-balanced-double.h \ 31 | modular-balanced-float.h \ 32 | modular-balanced-int32.h \ 33 | modular-balanced-int64.h \ 34 | modular-double.h \ 35 | modular-float.h 36 | 37 | 38 | pkgincludesub_HEADERS = \ 39 | $(BASIC_HDRS) 40 | 41 | # EXTRA_DIST = \ 42 | # modular.doxy 43 | -------------------------------------------------------------------------------- /linbox/ring/ntl.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 Brice Boyer (briceboyer), part of LinBox, GNU LGPL, see COPYING 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /*! @ingroup field 23 | @defgroup NTL NTL 24 | 25 | @brief NO DOC 26 | 27 | */ 28 | 29 | 30 | // vim:syntax=doxygen 31 | -------------------------------------------------------------------------------- /linbox/ring/ntl/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | pkgincludesubdir=$(pkgincludedir)/ring/ntl 23 | 24 | 25 | NTL_HDRS = \ 26 | ntl-rr.h \ 27 | ntl-zz_p.h \ 28 | ntl-zz_pe.h \ 29 | ntl-zz_px.h \ 30 | ntl-zz.h \ 31 | ntl-lzz_p.h \ 32 | ntl-lzz_pe.h \ 33 | ntl-lzz_px.h \ 34 | ntl-lzz_pex.h \ 35 | ntl-gf2e.h 36 | 37 | 38 | if LINBOX_HAVE_NTL 39 | USE_NTL_HDRS = $(NTL_HDRS) 40 | endif 41 | 42 | 43 | pkgincludesub_HEADERS = \ 44 | $(USE_NTL_HDRS) 45 | 46 | # EXTRA_DIST = \ 47 | # ntl.doxy 48 | -------------------------------------------------------------------------------- /linbox/ring/polynomial.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /*! @ingroup ring 23 | * @defgroup polynomials Polynomials 24 | * @brief NO DOC YET 25 | */ 26 | 27 | // vim:syn=doxygen 28 | -------------------------------------------------------------------------------- /linbox/solutions/charpoly.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup solutions 23 | @defgroup charpoly Characteristic polynomial 24 | @brief NO DOC YET 25 | 26 | */ 27 | 28 | // vim:syntax=doxygen 29 | -------------------------------------------------------------------------------- /linbox/solutions/constants.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright(C) LinBox 3 | * 4 | * ========LICENCE======== 5 | * This file is part of the library LinBox. 6 | * 7 | * LinBox is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | * ========LICENCE======== 21 | */ 22 | 23 | #pragma once 24 | 25 | #if !defined(LINBOX_DEFAULT_FAILURE_PROBABILITY) 26 | #define LINBOX_DEFAULT_FAILURE_PROBABILITY 0.001 27 | #endif 28 | 29 | #if !defined(LINBOX_DEFAULT_TRIALS_BEFORE_FAILURE) 30 | #define LINBOX_DEFAULT_TRIALS_BEFORE_FAILURE 20 31 | #endif 32 | 33 | #if !defined(LINBOX_DEFAULT_BLOCKING_FACTOR) 34 | #define LINBOX_DEFAULT_BLOCKING_FACTOR 16 35 | #endif 36 | 37 | #if !defined(LINBOX_DEFAULT_EARLY_TERMINATION_THRESHOLD) 38 | #define LINBOX_DEFAULT_EARLY_TERMINATION_THRESHOLD 10 39 | #endif 40 | 41 | // Used to decide which method to use when using Method::Auto on a Blackbox or Sparse matrix. 42 | #if !defined(LINBOX_USE_BLACKBOX_THRESHOLD) 43 | #define LINBOX_USE_BLACKBOX_THRESHOLD 1000u 44 | #endif 45 | -------------------------------------------------------------------------------- /linbox/solutions/determinant.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup solutions 23 | @defgroup determin Determinant 24 | @brief NO DOC YET 25 | 26 | */ 27 | 28 | // vim:syntax=doxygen 29 | -------------------------------------------------------------------------------- /linbox/solutions/echelon/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright(C) LinBox 2 | # 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # 6 | # LinBox is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # ========LICENCE======== 20 | 21 | 22 | pkgincludesubdir=$(pkgincludedir)/solutions/echelon 23 | 24 | pkgincludesub_HEADERS= \ 25 | echelon-auto.h \ 26 | echelon-dense-elimination.h 27 | -------------------------------------------------------------------------------- /linbox/solutions/minpoly.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup solutions 23 | @defgroup minpoly Minimal polynomial 24 | @brief NO DOC YET 25 | 26 | */ 27 | 28 | // vim:syntax=doxygen 29 | -------------------------------------------------------------------------------- /linbox/solutions/nullspace.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup solutions 23 | @defgroup nullsp Nullspace 24 | @brief NO DOC YET 25 | 26 | 27 | */ 28 | 29 | // vim:syntax=doxygen 30 | -------------------------------------------------------------------------------- /linbox/solutions/nullspace.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2009 LinBox 2 | * Written by Brice Boyer (briceboyer) 3 | * 4 | * 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | #ifndef __LINBOX_nullspace_H 26 | #define __LINBOX_nullspace_H 27 | 28 | /** \file linbox/solutions/nullspace.h 29 | * @brief Nullspace solutions. 30 | * This file will eventually comprehend : 31 | * - Dense matrix nullspace on Integers or Z/pZ 32 | * - Sparse matrix nullspace 33 | * - Random element in the nullspace 34 | */ 35 | 36 | namespace LinBox 37 | { 38 | #error "you don't want to include this file for now." 39 | } 40 | 41 | #endif // __LINBOX_modulardense_nullspace_H 42 | 43 | // Local Variables: 44 | // mode: C++ 45 | // tab-width: 4 46 | // indent-tabs-mode: nil 47 | // c-basic-offset: 4 48 | // End: 49 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 50 | -------------------------------------------------------------------------------- /linbox/solutions/rank.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup solutions 23 | @defgroup rk Rank 24 | @brief NO DOC YET 25 | 26 | */ 27 | 28 | // vim:syntax=doxygen 29 | -------------------------------------------------------------------------------- /linbox/solutions/reducedforms.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup solutions 23 | @defgroup reducedforms Recuded forms 24 | @brief NO DOC YET 25 | 26 | \section lu LU 27 | 28 | \section echelon Echelo 29 | 30 | \section frobenius Frobenius 31 | 32 | \section smith Smith normal form 33 | 34 | */ 35 | 36 | // vim:syntax=doxygen 37 | -------------------------------------------------------------------------------- /linbox/solutions/solution-tags.h: -------------------------------------------------------------------------------- 1 | /* linbox/solutions/methods.h 2 | * 3 | * Written by -bds 4 | * 5 | * ========LICENCE======== 6 | * This file is part of the library LinBox. 7 | * 8 | * LinBox is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * ========LICENCE======== 22 | *. 23 | */ 24 | 25 | /*! @file solutions/solution-tags.h 26 | * @ingroup solutions 27 | * @brief This allows files defining objects that have traits concerning several solutions 28 | to get the tags and traits with one inclusion. 29 | */ 30 | 31 | #ifndef __LINBOX_solution_tags_H 32 | #define __LINBOX_solution_tags_H 33 | 34 | namespace LinBox 35 | { 36 | namespace SolutionTags { 37 | struct Generic{}; // use for the general case 38 | struct Local{}; // use if the object has a local function to perform the solution. 39 | } // SolutionTags 40 | 41 | template struct GetEntryCategory; 42 | template struct TraceCategory; 43 | template struct DetCategory; 44 | template struct RankCategory; 45 | } 46 | #endif // __LINBOX_solution_tags_H 47 | 48 | // Local Variables: 49 | // mode: C++ 50 | // tab-width: 4 51 | // indent-tabs-mode: nil 52 | // c-basic-offset: 4 53 | // End: 54 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 55 | -------------------------------------------------------------------------------- /linbox/solutions/solve/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # This file is part of LinBox 3 | # ========LICENCE======== 4 | # This file is part of the library LinBox. 5 | # 6 | # LinBox is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | # ========LICENCE======== 20 | #/ 21 | 22 | pkgincludesubdir=$(pkgincludedir)/solutions/solve 23 | 24 | pkgincludesub_HEADERS= \ 25 | solve-auto.h \ 26 | solve-blackbox.h \ 27 | solve-cra.h \ 28 | solve-dense-elimination.h \ 29 | solve-dixon.h \ 30 | solve-elimination.h \ 31 | solve-lanczos.h \ 32 | solve-numeric-symbolic.h \ 33 | solve-sparse-elimination.h \ 34 | solve-wiedemann.h 35 | -------------------------------------------------------------------------------- /linbox/solutions/solve/solve-blackbox.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright(C) LinBox 3 | * 4 | * ========LICENCE======== 5 | * This file is part of the library LinBox. 6 | * 7 | * LinBox is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | * ========LICENCE======== 21 | */ 22 | 23 | #pragma once 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | namespace LinBox { 30 | // 31 | // solve 32 | // 33 | 34 | /** 35 | * \brief Solve specialisation for Blackbox. 36 | */ 37 | template 38 | ResultVector& solve(ResultVector& x, const Matrix& A, const Vector& b, const CategoryTag& tag, const Method::Blackbox& m) 39 | { 40 | return solve(x, A, b, tag, reinterpret_cast(m)); 41 | } 42 | 43 | // 44 | // solveInPlace 45 | // 46 | 47 | /** 48 | * \brief Solve in place specialisation for Blackbox. 49 | */ 50 | template 51 | ResultVector& solveInPlace(ResultVector& x, Matrix& A, const Vector& b, const CategoryTag& tag, const Method::Blackbox& m) 52 | { 53 | return solveInPlace(x, A, b, tag, reinterpret_cast(m)); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /linbox/solutions/systemsolving.doxy: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2010 LinBox, GNU LGPL, see COPYING for licence information 2 | /* 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | /** @ingroup solutions 23 | @defgroup systemsolving System solving 24 | @brief NO DOC YET 25 | 26 | 27 | */ 28 | 29 | // vim:syntax=doxygen 30 | -------------------------------------------------------------------------------- /linbox/util/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | #we now need to include givaro headers for timer ? 23 | 24 | AM_CPPFLAGS=-I$(top_srcdir) 25 | AM_CXXFLAGS=$(LINBOX_CXXFLAGS) $(FFLAS_FFPACK_CFLAGS) $(LINBOX_DEPS_CFLAGS) 26 | LDADD=$(LINBOX_DEPS_LIBS) $(FFLAS_FFPACK_LIBS) $(LINBOX_LDFLAGS) 27 | 28 | SUBDIRS=formats 29 | 30 | pkgincludesubdir=$(pkgincludedir)/util 31 | 32 | noinst_LTLIBRARIES=libutil.la 33 | 34 | 35 | libutil_la_SOURCES= \ 36 | error.C \ 37 | debug.C 38 | 39 | libutil_la_LDFLAGS= $(LDFLAGS) 40 | 41 | #libutil_la_LIBADD= \ 42 | # gmp++/libgmpxx.la 43 | 44 | pkgincludesub_HEADERS= \ 45 | args-parser.h \ 46 | commentator.h \ 47 | commentator.inl \ 48 | contracts.h \ 49 | debug.h \ 50 | error.h \ 51 | field-axpy.h \ 52 | iml_wrapper.h \ 53 | matrix-stream.h \ 54 | matrix-stream.inl \ 55 | mpicpp.h \ 56 | mpicpp.inl \ 57 | prime-stream.h \ 58 | serialization.h \ 59 | serialization.inl \ 60 | timer.h \ 61 | write-mm.h 62 | 63 | EXTRA_DIST = util.doxy 64 | -------------------------------------------------------------------------------- /linbox/util/args-parser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 the LinBox group 3 | * 4 | * Written by Brice Boyer (briceboyer) 5 | * 6 | * 7 | * 8 | * ========LICENCE======== 9 | * This file is part of the library LinBox. 10 | * 11 | * LinBox is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public 13 | * License as published by the Free Software Foundation; either 14 | * version 2.1 of the License, or (at your option) any later version. 15 | * 16 | * This library is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | * Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public 22 | * License along with this library; if not, write to the Free Software 23 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 24 | * ========LICENCE======== 25 | * 26 | */ 27 | 28 | #ifndef __LINBOX_util_args_parser_H 29 | #define __LINBOX_util_args_parser_H 30 | 31 | #include 32 | #include 33 | 34 | #endif // __LINBOX_util_args_parser_H 35 | 36 | // Local Variables: 37 | // mode: C++ 38 | // tab-width: 4 39 | // indent-tabs-mode: nil 40 | // c-basic-offset: 4 41 | // End: 42 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 43 | -------------------------------------------------------------------------------- /linbox/util/debug.C: -------------------------------------------------------------------------------- 1 | /* linbox/util/debug.C 2 | * Copyright (C) 2001 Bradford Hovinen 3 | * 4 | * Written by Bradford Hovinen 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | #include "linbox/linbox-config.h" 26 | 27 | #include 28 | 29 | #include "linbox/util/debug.h" 30 | 31 | namespace LinBox 32 | { 33 | void PreconditionFailed::setErrorStream (std::ostream &stream) 34 | { 35 | _errorStream = &stream; 36 | } 37 | 38 | std::ostream *PreconditionFailed::_errorStream; 39 | 40 | std::ostream *NotImplementedYet::_errorStream ; 41 | } 42 | 43 | // Local Variables: 44 | // mode: C++ 45 | // tab-width: 4 46 | // indent-tabs-mode: nil 47 | // c-basic-offset: 4 48 | // End: 49 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 50 | -------------------------------------------------------------------------------- /linbox/util/error.C: -------------------------------------------------------------------------------- 1 | /* linbox/util/error.C 2 | * Copyright (C) 1994-1997 Givaro Team 3 | * 4 | * Written by T. Gautier 5 | * 6 | * ========LICENCE======== 7 | * This file is part of the library LinBox. 8 | * 9 | * LinBox is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | * ========LICENCE======== 23 | */ 24 | 25 | #include "linbox/linbox-config.h" 26 | 27 | #include "linbox/util/error.h" 28 | 29 | namespace LinBox 30 | { 31 | std::ostream& operator<< (std::ostream& o, const LinboxError& E) 32 | { 33 | E.print(o) ; 34 | return o ; 35 | } 36 | } 37 | 38 | // Local Variables: 39 | // mode: C++ 40 | // tab-width: 4 41 | // indent-tabs-mode: nil 42 | // c-basic-offset: 4 43 | // End: 44 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 45 | -------------------------------------------------------------------------------- /linbox/util/formats/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | pkgincludesubdir=$(pkgincludedir)/util/formats 23 | 24 | pkgincludesub_HEADERS= \ 25 | generic-dense.h \ 26 | maple.h \ 27 | matrix-market.h \ 28 | sms.h \ 29 | matrix-stream-readers.h \ 30 | sparse-row.h 31 | 32 | 33 | -------------------------------------------------------------------------------- /linbox/util/util.doxy: -------------------------------------------------------------------------------- 1 | /* Copyright (c) LinBox 2 | * ========LICENCE======== 3 | * This file is part of the library LinBox. 4 | * 5 | * LinBox is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * ========LICENCE======== 19 | *. 20 | */ 21 | 22 | 23 | /** \ingroup linbox 24 | \defgroup util util 25 | 26 | @brief Miscellaneous utilities. 27 | 28 | Basic GMP integer wrapper, timers, commentator, matrix-stream-reader, error, debug. 29 | */ 30 | 31 | // vim:syn=doxygen 32 | -------------------------------------------------------------------------------- /linbox/vector/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | pkgincludesubdir=$(pkgincludedir)/vector 23 | 24 | EXTRA_DIST= \ 25 | vector.doxy 26 | 27 | pkgincludesub_HEADERS= \ 28 | pair.h \ 29 | light_container.h \ 30 | sparse.h \ 31 | vector-traits.h \ 32 | vector.h \ 33 | subvector.h \ 34 | subiterator.h \ 35 | reverse.h \ 36 | random.h \ 37 | stream.h \ 38 | stream-gf2.h \ 39 | bit-vector.h \ 40 | bit-vector.inl \ 41 | blas-vector.h \ 42 | blas-subvector.h \ 43 | vector-domain.h \ 44 | vector-domain-gf2.h \ 45 | vector-domain.inl \ 46 | vector-domain-gf2.inl 47 | -------------------------------------------------------------------------------- /linbox/vector/slicedpolynomialvector/SlicedPolynomialMatrixVectorMulKaratsuba.h: -------------------------------------------------------------------------------- 1 | #ifndef __LINBOX_matrix_SlicedPolynomialMatrix_SlicedPolynomialMatrixVectorMulKaratsuba_H 2 | #define __LINBOX_matrix_SlicedPolynomialMatrix_SlicedPolynomialMatrixVectorMulKaratsuba_H 3 | 4 | #include "linbox/matrix/slicedpolynomialmatrix/SlicedPolynomialMatrix.h" 5 | #include "linbox/vector/slicedpolynomialvector/SlicedPolynomialVector.h" 6 | 7 | namespace LinBox 8 | { 9 | template< class Field, class Operand1, class Operand2, class Operand3> 10 | class SlicedPolynomialMatrixVectorMulKaratsuba 11 | { 12 | private: 13 | typedef Operand1::IntField IntField; 14 | typedef BlasMatrix Matrix; 15 | typedef BlasVector Vector; 16 | typedef std::vector vecM; 17 | typedef std::vector vecV; 18 | typedef Operand1::polynomial polynomial; 19 | vec& karatsuba(IntField& F, vecV& C, vecM& A, vecV& B); 20 | public: 21 | Operand1 &operator() (const Field &GF, Operand1 &C, const Operand2 &A, const Operand3 &B) const; 22 | }; 23 | } /* end of namespace LinBox */ 24 | 25 | #include "SlicedPolynomialMatrixVectorMulKaratsuba.inl" 26 | 27 | #endif 28 | 29 | // Local Variables: 30 | // mode: C++ 31 | // tab-width: 4 32 | // indent-tabs-mode: nil 33 | // c-basic-offset: 4 34 | // End: 35 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 36 | -------------------------------------------------------------------------------- /linbox/vector/slicedpolynomialvector/SlicedPolynomialVectorAddSub.h: -------------------------------------------------------------------------------- 1 | #ifndef __LINBOX_matrix_SlicedPolynomialVector_SlicedPolynomialVectorAddSub_H 2 | #define __LINBOX_matrix_SlicedPolynomialVector_SlicedPolynomialVectorAddSub_H 3 | 4 | #include 5 | #include "linbox/matrix/matrixdomain/vector-domain.h" 6 | #include "linbox/matrix/slicedpolynomialvector/SlicedPolynomialVector.h" 7 | 8 | namespace LinBox 9 | { 10 | /* internal 11 | * Adding two vectors 12 | */ 13 | template< class Field, class Operand1, class Operand2, class Operand3> 14 | class SlicedPolynomialVectorAdd 15 | { 16 | public: 17 | Operand1 &operator() (const Field &F, Operand1 &C, const Operand2 &A, const Operand3 &B) const; 18 | 19 | }; 20 | 21 | /* internal 22 | * Substracting two vectors 23 | */ 24 | template< class Field, class Operand1, class Operand2, class Operand3> 25 | class SlicedPolynomialVectorSub 26 | { 27 | public: 28 | Operand1 &operator() (const Field &F, Operand1 &C, const Operand2 &A, const Operand3 &B) const; 29 | 30 | }; 31 | 32 | //! C += A 33 | template< class Field, class Operand1, class Operand2> 34 | class SlicedPolynomialVectorAddin 35 | { 36 | public: 37 | Operand1 &operator() (const Field &F, Operand1 &C, const Operand2 &A) const; 38 | 39 | }; 40 | 41 | //! C -= A 42 | template< class Field, class Operand1, class Operand2> 43 | class SlicedPolynomialVectorSubin 44 | { 45 | public: 46 | Operand1 &operator() (const Field &F, Operand1 &C, const Operand2 &A) const; 47 | 48 | }; 49 | } /* end of namespace LinBox */ 50 | 51 | #include "SlicedPolynomialVectorAddSub.inl" 52 | 53 | #endif 54 | 55 | // Local Variables: 56 | // mode: C++ 57 | // tab-width: 4 58 | // indent-tabs-mode: nil 59 | // c-basic-offset: 4 60 | // End: 61 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 62 | -------------------------------------------------------------------------------- /macros/aclocal-include.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (c) 2011 the LinBox group 2 | dnl This file is part of LinBox 3 | 4 | dnl ========LICENCE======== 5 | dnl This file is part of the library LinBox. 6 | dnl 7 | dnl LinBox is free software: you can redistribute it and/or modify 8 | dnl it under the terms of the GNU Lesser General Public 9 | dnl License as published by the Free Software Foundation; either 10 | dnl version 2.1 of the License, or (at your option) any later version. 11 | dnl 12 | dnl This library is distributed in the hope that it will be useful, 13 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | dnl Lesser General Public License for more details. 16 | dnl 17 | dnl You should have received a copy of the GNU Lesser General Public 18 | dnl License along with this library; if not, write to the Free Software 19 | dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | dnl ========LICENCE======== 21 | dnl 22 | 23 | 24 | dnl aclocal-include.m4 25 | dnl This macro adds the name macrodir to the set of directories 26 | dnl that `aclocal' searches for macros. 27 | 28 | dnl serial 1 29 | 30 | dnl AM_ACLOCAL_INCLUDE(macrodir) 31 | AC_DEFUN([AM_ACLOCAL_INCLUDE], 32 | [ 33 | AM_CONDITIONAL(INSIDE_GNOME_COMMON, test x = y) 34 | 35 | test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" 36 | 37 | for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done 38 | ]) 39 | -------------------------------------------------------------------------------- /macros/lapack-check.m4: -------------------------------------------------------------------------------- 1 | dnl Check for LAPACK in fflas-ffpack 2 | dnl 3 | dnl Copyright (c) 2011 the LinBox group 4 | dnl Written by Brice Boyer (briceboyer) 5 | dnl This file is part of LinBox 6 | 7 | dnl ========LICENCE======== 8 | dnl This file is part of the library LinBox. 9 | dnl 10 | dnl LinBox is free software: you can redistribute it and/or modify 11 | dnl it under the terms of the GNU Lesser General Public 12 | dnl License as published by the Free Software Foundation; either 13 | dnl version 2.1 of the License, or (at your option) any later version. 14 | dnl 15 | dnl This library is distributed in the hope that it will be useful, 16 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | dnl Lesser General Public License for more details. 19 | dnl 20 | dnl You should have received a copy of the GNU Lesser General Public 21 | dnl License along with this library; if not, write to the Free Software 22 | dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 23 | dnl ========LICENCE======== 24 | dnl 25 | 26 | dnl LB_CHECK_LAPACK 27 | 28 | AC_DEFUN([LB_CHECK_LAPACK], 29 | [ 30 | 31 | AC_MSG_CHECKING(for LAPACK in fflas-ffpack) 32 | 33 | BACKUP_CXXFLAGS=${CXXFLAGS} 34 | BACKUP_LIBS=${LIBS} 35 | 36 | CXXFLAGS="${BACKUP_CXXFLAGS} ${FFLAS_FFPACK_CFLAGS}" 37 | LIBS="${BACKUP_LIBS} ${FFLAS_FFPACK_LIBS}" 38 | 39 | AC_TRY_RUN(dnl ICC ? 40 | [ #include "fflas-ffpack/fflas-ffpack-config.h" 41 | #ifdef __FFLASFFPACK_HAVE_LAPACK 42 | int main() { return 0 ; } 43 | #else 44 | a pas lapack 45 | #endif 46 | ],dnl 47 | [dnl 48 | AC_MSG_RESULT(ok) 49 | AC_DEFINE(HAVE_LAPACK,1,[Define if LAPACK is available]) 50 | AM_CONDITIONAL(LINBOX_HAVE_LAPACK, true) 51 | ],dnl 52 | [ 53 | AC_MSG_RESULT(no) 54 | AM_CONDITIONAL(LINBOX_HAVE_LAPACK, false) 55 | ],dnl 56 | [ 57 | AC_MSG_RESULT(unknown) 58 | AM_CONDITIONAL(LINBOX_HAVE_LAPACK, false) 59 | ]) 60 | 61 | CXXFLAGS=${BACKUP_CXXFLAGS} 62 | LIBS=${BACKUP_LIBS} 63 | 64 | 65 | ]) 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /macros/linbox-opt.m4: -------------------------------------------------------------------------------- 1 | dnl Copyright (c) the LinBox group 2 | dnl This file is part of LinBox 3 | 4 | dnl ========LICENCE======== 5 | dnl This file is part of the library LinBox. 6 | dnl 7 | dnl LinBox is free software: you can redistribute it and/or modify 8 | dnl it under the terms of the GNU Lesser General Public 9 | dnl License as published by the Free Software Foundation; either 10 | dnl version 2.1 of the License, or (at your option) any later version. 11 | dnl 12 | dnl This library is distributed in the hope that it will be useful, 13 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | dnl Lesser General Public License for more details. 16 | dnl 17 | dnl You should have received a copy of the GNU Lesser General Public 18 | dnl License along with this library; if not, write to the Free Software 19 | dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | dnl ========LICENCE======== 21 | dnl 22 | 23 | 24 | 25 | AC_DEFUN([LB_OPT], 26 | [ 27 | AC_MSG_CHECKING([whether to use run time optimization]) 28 | 29 | AC_ARG_ENABLE(optimization, 30 | [AC_HELP_STRING([--enable-optimization], [Enable run time optimization in LinBox code (only Strassen matrix threshold for now)])], 31 | [ 32 | dnl AC_DEFINE_UNQUOTED(WINOTHRESHOLD, __FFLASFFPACK_WINOTHRESHOLD) ? 33 | 34 | WINO="`grep "define.*__FFLASFFPACK_WINOTHRESHOLD" ${FFLAS_FFPACK_LOC}/include/fflas-ffpack/fflas-ffpack-optimise.h | awk '{print $NF}'`" 35 | AS_IF([ test -z "{WINO}"],[ 36 | AC_MSG_RESULT("fflas-ffpack was not optimised. Defaulting") 37 | WINO="`grep "define.*__FFLASFFPACK_WINOTHRESHOLD" ${FFLAS_FFPACK_LOC}/include/fflas-ffpack/fflas-ffpack-config.h | awk '{print $NF}'`" 38 | ],[ 39 | AC_MSG_RESULT(OK) 40 | ]) 41 | AC_DEFINE_UNQUOTED(WINOTHRESHOLD, $WINO, [optimized threshold for switching to strassen matrix multiplication]) 42 | 43 | ], 44 | [AC_MSG_RESULT(no)]) 45 | ]) 46 | 47 | -------------------------------------------------------------------------------- /macros/maple-check-version.mpl: -------------------------------------------------------------------------------- 1 | # Copyright (c) the LinBox group 2 | # This file is part of LinBox 3 | # see COPYING for licence 4 | 5 | 6 | fd := FileTools[Text][Open]("maple_version.txt", create=true, overwrite=true); 7 | v:=substring(kernelopts(version),7..SearchText(".",kernelopts(version))-1); 8 | FileTools[Text][WriteString](fd,convert(v,string)); 9 | -------------------------------------------------------------------------------- /macros/tinyxml2-check.m4: -------------------------------------------------------------------------------- 1 | dnl Check for FPLLL 2 | dnl Copyright (c) the LinBox group 3 | dnl Brice Boyer (briceboyer) 10/09/13 4 | dnl This file is part of LinBox 5 | 6 | dnl ========LICENCE======== 7 | dnl This file is part of the library LinBox. 8 | dnl 9 | dnl LinBox is free software: you can redistribute it and/or modify 10 | dnl it under the terms of the GNU Lesser General Public 11 | dnl License as published by the Free Software Foundation; either 12 | dnl version 2.1 of the License, or (at your option) any later version. 13 | dnl 14 | dnl This library is distributed in the hope that it will be useful, 15 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | dnl Lesser General Public License for more details. 18 | dnl 19 | dnl You should have received a copy of the GNU Lesser General Public 20 | dnl License along with this library; if not, write to the Free Software 21 | dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | dnl ========LICENCE======== 23 | dnl 24 | 25 | AC_DEFUN([LB_CHECK_XML], 26 | [ 27 | AC_MSG_CHECKING(if tinyxml2 is available) 28 | SAVED_LIBS=$LIBS 29 | LIBS="$LIBS -ltinyxml2" 30 | AC_TRY_LINK( 31 | [#include ], 32 | [ 33 | using namespace tinyxml2 ; 34 | XMLDocument doc; 35 | ], 36 | [ 37 | AC_MSG_RESULT(yes) 38 | AC_DEFINE(HAVE_TINYXML2,1,[Define if tinyxml2 is installed]) 39 | XML_LIBS="-ltinyxml2" 40 | AC_SUBST(XML_LIBS) 41 | ], 42 | [AC_MSG_RESULT(no) 43 | AC_MSG_WARN([tinyxml2 is not installed (no import/export of benchmarks).])] 44 | ) 45 | LIBS=$SAVED_LIBS 46 | ]) 47 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | machecker 2 | test-bitonic-sort 3 | test-blackbox-block-container 4 | test-blas-domain 5 | test-butterfly 6 | test-companion 7 | test-dense 8 | test-diagonal 9 | test-dif 10 | test-direct-sum 11 | test-echelon-form 12 | test-ffpack 13 | test-fibb 14 | test-getentry 15 | test-gf2 16 | test-givaropoly 17 | test-gmp-rational 18 | test-hilbert 19 | test-hom 20 | test-inverse 21 | test-last-invariant-factor 22 | test-matrix-domain 23 | test-matrix-stream 24 | test-minpoly 25 | test-modular-balanced-float 26 | test-modular-double 27 | test-modular-float 28 | test-modular-int 29 | test-ntl-hankel 30 | test-ntl-lzz_p 31 | test-ntl-lzz_pe 32 | test-ntl-lzz_pex 33 | test-ntl-lzz_px 34 | test-ntl-rr 35 | test-ntl-sylvester 36 | test-ntl-toeplitz 37 | test-ntl-zz_p 38 | test-nullspace 39 | test-order-basis 40 | test-param-fuzzy 41 | test-permutation 42 | test-plain-domain 43 | test-qlup 44 | test-randiter-nonzero 45 | test-random-matrix 46 | test-rational-matrix-factory 47 | test-scalar-matrix 48 | test-smith-form 49 | test-smith-form-adaptive 50 | test-smith-form-iliopoulos 51 | test-smith-form-local 52 | test-sparse2 53 | test-subiterator 54 | test-submatrix 55 | test-subvector 56 | test-sum 57 | test-toeplitz-det 58 | test-toom-cook 59 | test-trace 60 | test-transpose 61 | test-triplesbb 62 | test-triplesbb-omp 63 | test-vector-domain 64 | test-zero-one 65 | -------------------------------------------------------------------------------- /tests/TODO: -------------------------------------------------------------------------------- 1 | Functionality that needs to be tested: 2 | 3 | * Permutation matrices (apply and applyTranspose) 4 | * Reading and writing matrices to/from disk 5 | * Printing matrices in human-readable format 6 | * Random iterators 7 | * Vector streams 8 | 9 | More generally 10 | * Timing information 11 | -------------------------------------------------------------------------------- /tests/benchmark-blas-domain.C: -------------------------------------------------------------------------------- 1 | 2 | // Local Variables: 3 | // mode: C++ 4 | // tab-width: 4 5 | // indent-tabs-mode: nil 6 | // c-basic-offset: 4 7 | // End: 8 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 9 | -------------------------------------------------------------------------------- /tests/data/30_30_27.sms: -------------------------------------------------------------------------------- 1 | 30 30 M 2 | 1 6 -1 3 | 1 8 -8 4 | 2 10 5 5 | 2 15 -3 6 | 2 24 11 7 | 3 8 -7 8 | 3 12 -1 9 | 3 21 1 10 | 3 30 -6 11 | 4 6 -6 12 | 5 4 3 13 | 5 7 -12 14 | 5 23 -2 15 | 5 24 6 16 | 5 25 8 17 | 6 10 8 18 | 6 15 8 19 | 6 28 -9 20 | 6 29 6 21 | 7 5 -3 22 | 7 7 8 23 | 8 3 -3 24 | 8 9 9 25 | 8 12 13 26 | 8 14 5 27 | 9 12 -13 28 | 9 14 8 29 | 9 18 -12 30 | 9 25 -2 31 | 10 1 7 32 | 10 7 -3 33 | 10 9 3 34 | 10 11 -4 35 | 10 17 -5 36 | 10 21 -11 37 | 10 22 -9 38 | 10 23 7 39 | 10 25 -6 40 | 11 6 -12 41 | 11 10 11 42 | 12 3 3 43 | 12 5 1 44 | 12 6 14 45 | 12 26 11 46 | 13 14 9 47 | 13 24 9 48 | 14 23 -11 49 | 14 24 1 50 | 15 13 -11 51 | 17 14 14 52 | 17 23 -13 53 | 17 24 -4 54 | 18 23 5 55 | 18 24 7 56 | 18 28 1 57 | 19 14 -12 58 | 20 3 1 59 | 20 14 10 60 | 20 23 9 61 | 21 5 -2 62 | 21 7 5 63 | 21 9 -12 64 | 21 22 -7 65 | 21 23 -3 66 | 22 1 -11 67 | 22 5 3 68 | 23 7 2 69 | 23 9 -6 70 | 23 18 8 71 | 23 24 3 72 | 24 5 12 73 | 24 12 13 74 | 25 4 -4 75 | 25 5 14 76 | 25 11 -13 77 | 25 18 4 78 | 26 3 -7 79 | 26 8 -11 80 | 26 24 -14 81 | 27 7 11 82 | 27 19 11 83 | 28 7 -14 84 | 28 20 -10 85 | 28 28 -12 86 | 29 27 3 87 | 30 14 4 88 | 30 17 -9 89 | 30 24 -13 90 | 30 27 11 91 | 30 30 -6 92 | 0 0 0 93 | -------------------------------------------------------------------------------- /tests/data/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | EXTRA_DIST = \ 23 | sms.matrix \ 24 | matrix-market-array.matrix \ 25 | maple-sparse1.matrix \ 26 | maple-dense1.matrix \ 27 | generic-dense.matrix \ 28 | sparse-row.matrix \ 29 | matrix-market-coordinate.matrix \ 30 | 30_30_27.sms \ 31 | fib25.sms 32 | 33 | # test.matrix \ 34 | # 35 | -------------------------------------------------------------------------------- /tests/data/generic-dense.matrix: -------------------------------------------------------------------------------- 1 | 11 11 2 | 0 0 2 3 0 0 0 0 0 1 0 3 | 0 0 0 0 0 0 0 0 0 0 0 4 | 2 0 8888888888888888888 1 -1 0 0 0 0 0 6 5 | 3 0 1 4 0 0 12 0 0 -13 0 6 | 7 | 8 | 0 0 9 | -1 10 | 0 11 | 0 12 | 0 13 | 14 | 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 15 | 0 16 | 0 0 0 12 0 0 0 0 0 0 0 17 | 0 0 0 0 0 1 0 500 400 300 200 18 | 0 0 0 0 0 0 0 400 0 0 0 19 | 1 0 0 -13 0 1 0 300 0 10 1 20 | 0 0 6 0 0 0 0 200 0 1 0 21 | -------------------------------------------------------------------------------- /tests/data/maple-dense1.matrix: -------------------------------------------------------------------------------- 1 | Matrix([[0, 0, 2, 3, 0, 0, 0, 0, 0, 1,0],[0],[2, 0 2 | , 8888888888888888888, 1, -1, 0, 0, 0, 0, 0, 6],[3, 0, 1, 4, 0, 0, 12, 0, 0, -13, 0],[0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0],[0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 1, 0, 500, 400, 300, 200],[0, 0, 0, 0, 0, 0, 0, 400, 0, 0, 0],[1, 0, 0, -13, 0, 1, 0, 300, 0, 10, 1],[0, 0, 6, 0, 0, 0, 0, 200, 0, 1, 0]]) 3 | -------------------------------------------------------------------------------- /tests/data/maple-sparse1.matrix: -------------------------------------------------------------------------------- 1 | M := Matrix(11,{(1,3)=2,(1,4)=3,(1,10)=1,(3,1)=2,(3,4)=1,(3,5) 2 | =-1, 3 | (3,11)=6, (3,3)=8888888888888888888, 4 | 5 | 6 | ( 7 | 8 | 4, 1 ) 9 | = 10 | 11 | 3 , 12 | 13 | (10,1)=1, 14 | (4,3)=1, 15 | (5,3)=-1, 16 | (11,3)=6, 17 | (4,4)=4, 18 | (4,7)=12, 19 | (7,4)=12, 20 | (4,10)=-13, 21 | (10,4) = -13, 22 | (6,6)=1, 23 | (6,8)=1, 24 | (8,6)=1, 25 | (6,10)=1, 26 | (10,6)=1, 27 | (8,8)=500, 28 | (8,9)=400, 29 | (9,8)=400, 30 | (8,10)=300, 31 | (10,8)=300, 32 | (8,11)=200, 33 | (11,8)=200, 34 | (10,10)=10, 35 | (10,11)=1, 36 | (11,10)=1 }, storage=anything, another_setting=another_value ) 37 | -------------------------------------------------------------------------------- /tests/data/matrix-market-array.matrix: -------------------------------------------------------------------------------- 1 | %%MatrixMarket matrix array integer symmetric 2 | % Here is where the comments would go 3 | % Remember that Matrix Market does things in column-major (aka Fortran) order 4 | % 5 | % 6 | % 7 | 8 | 9 | 11 11 10 | 0 11 | 0 12 | 2 13 | 3 14 | 0 15 | 0 16 | 0 17 | 0 18 | 0 19 | 1 20 | 0 21 | 0 22 | 0 23 | 0 24 | 0 25 | 0 26 | 0 27 | 0 28 | 0 29 | 0 30 | 0 31 | 8888888888888888888 32 | 1 33 | -1 34 | 0 35 | 0 36 | 0 37 | 0 38 | 0 39 | 6 40 | 4 41 | 0 42 | 0 43 | 12 44 | 0 45 | 0 46 | -13 47 | 0 48 | 0 49 | 0 50 | 0 51 | 0 52 | 0 53 | 0 54 | 0 55 | 1 56 | 0 57 | 1 58 | 0 59 | 1 60 | 0 61 | 0 62 | 0 63 | 0 64 | 0 65 | 0 66 | 500 67 | 400 68 | 300 69 | 200 70 | 0 71 | 0 72 | 0 73 | 10 74 | 1 75 | 0 76 | 77 | -------------------------------------------------------------------------------- /tests/data/matrix-market-coordinate.matrix: -------------------------------------------------------------------------------- 1 | %%MatrixMarket maTRIX COORDINATE inteGER gENERal 2 | % 3 | 11 11 33 4 | 1 3 2 5 | 1 4 3 6 | 1 10 1 7 | 3 1 2 8 | 3 3 8888888888888888888 9 | 3 4 1 10 | 3 5 -1 11 | 3 11 6 12 | 11 10 1 13 | 11 8 200 14 | 11 3 6 15 | 10 1 1 16 | 4 1 3 17 | 5 3 -1 18 | 4 3 1 19 | 4 4 4 20 | 7 4 12 21 | 10 4 -13 22 | 6 6 1 23 | 8 6 1 24 | 10 6 1 25 | 4 7 12 26 | 4 10 -13 27 | 6 8 1 28 | 6 10 1 29 | 8 8 500 30 | 8 9 400 31 | 8 10 300 32 | 8 11 200 33 | 9 8 400 34 | 10 8 300 35 | 10 10 10 36 | 10 11 1 37 | 38 | -------------------------------------------------------------------------------- /tests/data/rk9_7_10.sms: -------------------------------------------------------------------------------- 1 | 10 10 M 2 | 1 2 7 3 | 1 3 83 4 | 1 7 38 5 | 2 1 6 6 | 2 4 16 7 | 2 9 24 8 | 3 5 56 9 | 3 6 79 10 | 3 7 61 11 | 4 7 65 12 | 4 8 9 13 | 4 9 98 14 | 5 1 27 15 | 5 9 87 16 | 6 4 57 17 | 6 6 28 18 | 6 8 35 19 | 7 1 93 20 | 7 4 43 21 | 7 8 95 22 | 8 2 94 23 | 8 3 40 24 | 9 2 66 25 | 9 8 60 26 | 9 9 21 27 | 10 10 1 28 | 0 0 0 29 | -------------------------------------------------------------------------------- /tests/data/sms.matrix: -------------------------------------------------------------------------------- 1 | 11 11 M 2 | 1 3 2 3 | 1 4 3 4 | 1 10 1 5 | 3 1 2 6 | 3 3 8888888888888888888 7 | 3 4 1 8 | 3 5 -1 9 | 3 11 6 10 | 11 10 1 11 | 11 8 200 12 | 11 3 6 13 | 10 1 1 14 | 4 1 3 15 | 5 3 -1 16 | 4 3 1 17 | 4 4 4 18 | 7 4 12 19 | 10 4 -13 20 | 6 6 1 21 | 8 6 1 22 | 10 6 1 23 | 4 7 12 24 | 4 10 -13 25 | 6 8 1 26 | 6 10 1 27 | 8 8 500 28 | 8 9 400 29 | 8 10 300 30 | 8 11 200 31 | 9 8 400 32 | 10 8 300 33 | 10 10 10 34 | 10 11 1 35 | 0 0 0 36 | -------------------------------------------------------------------------------- /tests/data/sparse-row.matrix: -------------------------------------------------------------------------------- 1 | #Here are some 2 | # comments. 3 | 4 | 11 11 S 5 | 3 2 2 3 3 9 1 6 | 0 7 | 5 0 2 2 8888888888888888888 3 1 4 -1 10 6 8 | 5 0 3 2 1 3 4 6 12 9 -13 9 | 1 2 -1 10 | 3 5 1 7 1 9 1 11 | 1 3 12 12 | 5 5 1 7 500 8 400 9 300 10 200 13 | 1 7 400 14 | 6 0 1 3 -13 5 1 7 300 9 10 10 1 15 | 3 2 6 7 200 9 1 16 | -------------------------------------------------------------------------------- /tests/matrix/Makefile.am: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011 the LinBox group 2 | # ========LICENCE======== 3 | # This file is part of the library LinBox. 4 | # 5 | # LinBox is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | # ========LICENCE======== 19 | 20 | 21 | 22 | 23 | EXTRA_DIST = \ 24 | coin.h \ 25 | hadamard.h \ 26 | invhilb.h \ 27 | jmat.h \ 28 | minmax.h \ 29 | randomans.h\ 30 | randommat.h 31 | -------------------------------------------------------------------------------- /tests/matrix/coin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) LinBox 3 | * 4 | * ========LICENCE======== 5 | * This file is part of the library LinBox. 6 | * 7 | * LinBox is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | * ========LICENCE======== 21 | 22 | */ 23 | 24 | #ifndef _COIN_H 25 | #define _COIN_H 26 | 27 | #define CEILING 100 28 | #define R_CEILING 1000 29 | #define COMB_CEILING 10 30 | 31 | #endif 32 | 33 | // Local Variables: 34 | // mode: C++ 35 | // tab-width: 4 36 | // indent-tabs-mode: nil 37 | // c-basic-offset: 4 38 | // End: 39 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 40 | -------------------------------------------------------------------------------- /tests/matrix/hadamard.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) LinBox 2 | * 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | 23 | 24 | namespace LinBox{ 25 | 26 | void isPower2(size_t n){ 27 | size_t p = 1; 28 | while(p < n) p <<= 1; 29 | if(p != n){} // THROW ERROR }; 30 | } 31 | 32 | template 33 | Matrix& hadamard(const Ring& R, Matrix& Mat, size_t n){ 34 | uint64_t val = 1; 35 | typename Ring::Element tmp; 36 | 37 | Mat.setEntry(0, 0, R.init(tmp, val)); 38 | 39 | for(size_t k = 1; k < n; k*=2){ 40 | for(size_t i = 0; i < k; ++i){ 41 | for(size_t j = 0; j < k; ++j){ 42 | Mat.getEntry(tmp, i, j); 43 | Mat.setEntry(i+k, j, tmp); 44 | Mat.setEntry(i, j+k, tmp); 45 | Mat.setEntry(i+k, j+k, R.negin(tmp)); 46 | } 47 | } 48 | } 49 | 50 | return Mat; 51 | } 52 | 53 | } 54 | 55 | // Local Variables: 56 | // mode: C++ 57 | // tab-width: 4 58 | // indent-tabs-mode: nil 59 | // c-basic-offset: 4 60 | // End: 61 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 62 | -------------------------------------------------------------------------------- /tests/matrix/invhilb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) LinBox 3 | * 4 | * ========LICENCE======== 5 | * This file is part of the library LinBox. 6 | * 7 | * LinBox is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | * ========LICENCE======== 21 | 22 | */ 23 | 24 | #include 25 | #include "linbox/integer.h" 26 | 27 | //#include 28 | //using namespace std; 29 | namespace LinBox{ 30 | 31 | template 32 | Matrix& invhilb(const Ring& R, Matrix& Mat, int n){ 33 | typedef typename Ring::Element Element; 34 | 35 | integer p = n; 36 | integer r; 37 | Element val; 38 | int i, j, i_ind, j_ind; 39 | for(i_ind=0, i = 1; i <= n; i++, i_ind++){ 40 | if(i>1) p = ((n-i+1)*p*(n+i-1))/((i-1)*(i-1)); 41 | r = p*p; 42 | R.init(val, (r/(2*i-1))); 43 | Mat.setEntry((size_t)i_ind,(size_t) i_ind, val); 44 | for(j_ind=i, j = i+1; j <= n; j++, j_ind++){ 45 | r = -1*((n-j+1)*r*(n+j-1))/((j-1)*(j-1)); 46 | R.init(val, (r/(i+j-1))); 47 | Mat.setEntry((size_t)i_ind, (size_t)j_ind, val); 48 | Mat.setEntry((size_t)j_ind, (size_t)i_ind, val); 49 | } 50 | } 51 | 52 | return Mat; 53 | } 54 | 55 | } 56 | 57 | // Local Variables: 58 | // mode: C++ 59 | // tab-width: 4 60 | // indent-tabs-mode: nil 61 | // c-basic-offset: 4 62 | // End: 63 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 64 | -------------------------------------------------------------------------------- /tests/matrix/jmat.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) LinBox 2 | * 3 | * ========LICENCE======== 4 | * This file is part of the library LinBox. 5 | * 6 | * LinBox is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * ========LICENCE======== 20 | */ 21 | 22 | 23 | 24 | namespace LinBox{ 25 | 26 | uint64_t lambda = 1000000000; 27 | 28 | template 29 | Matrix& jordanform(const Ring& R, Matrix& Mat, size_t n){ 30 | uint64_t val = 1; 31 | typename Ring::Element one, lam; 32 | R.init(one, val); 33 | R.init(lam, lambda); 34 | 35 | Mat.setEntry(0, 0, one); 36 | 37 | for(size_t i = 0; i < n; ++i){ 38 | for(size_t j = 0; j < n; ++j){ 39 | if(i == j) Mat.setEntry(i, j, lam); 40 | if(j+1 == i) Mat.setEntry(i, j, one); 41 | } 42 | } 43 | 44 | return Mat; 45 | } 46 | 47 | } //LinBox 48 | 49 | // Local Variables: 50 | // mode: C++ 51 | // tab-width: 4 52 | // indent-tabs-mode: nil 53 | // c-basic-offset: 4 54 | // End: 55 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 56 | -------------------------------------------------------------------------------- /tests/test-frobenius-large.C: -------------------------------------------------------------------------------- 1 | #include "linbox/linbox-config.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "linbox/ring/modular.h" 8 | #include "linbox/util/commentator.h" 9 | #include "linbox/ring/ntl.h" 10 | 11 | #include "linbox/algorithms/frobenius-large.h" 12 | 13 | #include "test-frobenius.h" 14 | 15 | using namespace LinBox; 16 | 17 | int main(int argc, char** argv) { 18 | uint64_t p = 10007; 19 | uint64_t e = 1; 20 | size_t k = 0; 21 | int seed = time(NULL); 22 | 23 | static Argument args[] = { 24 | { 'k', "-k K", "Number of invariant factors to compute (default k=0 for all)", TYPE_INT, &k}, 25 | { 'p', "-p P", "Set characteristic of field GF(p^e)", TYPE_INT, &p}, 26 | { 'e', "-e E", "Set extension degree of field GF(p^e)", TYPE_INT, &e}, 27 | { 'r', "-r R", "Random seed", TYPE_INT, &seed}, 28 | END_OF_ARGUMENTS 29 | }; 30 | 31 | parseArguments(argc,argv,args); 32 | 33 | srand(seed); 34 | 35 | //typedef Givaro::Modular Field; 36 | typedef NTL_zz_p Field; 37 | Field F(p,e); 38 | 39 | typedef NTL_zz_pX PolyRing; 40 | PolyRing R(F); 41 | 42 | FrobeniusLarge FLD(R); 43 | bool pass = testFrobenius(FLD, F, R, k); 44 | return pass ? 0 : -1; 45 | } 46 | -------------------------------------------------------------------------------- /tests/test-frobenius-small.C: -------------------------------------------------------------------------------- 1 | #include "linbox/linbox-config.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "linbox/ring/modular.h" 8 | #include "linbox/util/commentator.h" 9 | #include "linbox/ring/ntl.h" 10 | 11 | #include "linbox/algorithms/frobenius-small.h" 12 | 13 | #include "test-frobenius.h" 14 | 15 | using namespace LinBox; 16 | 17 | int main(int argc, char** argv) { 18 | uint64_t p = 3; 19 | size_t k = 0; 20 | int seed = time(NULL); 21 | 22 | static Argument args[] = { 23 | { 'k', "-k K", "Number of invariant factors to compute (default k=0 for all)", TYPE_INT, &k}, 24 | { 'p', "-p P", "Set the field GF(p)", TYPE_INT, &p}, 25 | { 'r', "-r R", "Random seed", TYPE_INT, &seed}, 26 | END_OF_ARGUMENTS 27 | }; 28 | 29 | parseArguments(argc,argv,args); 30 | 31 | srand(seed); 32 | 33 | typedef Givaro::Modular Field; 34 | Field F(p); 35 | 36 | typedef NTL_zz_pX PolyRing; 37 | PolyRing R(p); 38 | 39 | FrobeniusSmall FSD(F, R); 40 | bool pass = testFrobenius(FSD, F, R, k); 41 | return pass ? 0 : -1; 42 | } 43 | -------------------------------------------------------------------------------- /tests/test-generic.h: -------------------------------------------------------------------------------- 1 | /* linbox/tests/test-generic.h 2 | * Copyright (C) 2001, 2002 Bradford Hovinen 3 | * 4 | * ========LICENCE======== 5 | * This file is part of the library LinBox. 6 | * 7 | * LinBox is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | * ========LICENCE======== 21 | *. 22 | * 23 | * Written by Bradford Hovinen 24 | * 25 | * ------------------------------------ 26 | * 2002-04-11 Bradford Hovinen 27 | * 28 | * Added test testFieldAXPY 29 | * 2003-03-11 Austin Lobo 30 | * 31 | * Added testApply and testApplyTranspose to time critical 32 | * blackbox-functions. 33 | * ------------------------------------ 34 | * fix testLinearity for rectangular matrices. 2006-02-17 Hui Wang 35 | * 36 | * 2007June bds split into three files 37 | */ 38 | 39 | #ifndef __LINBOX_test_generic_H 40 | #define __LINBOX_test_generic_H 41 | 42 | #include "test-field.h" 43 | #include "test-blackbox.h" 44 | #include "test-vector-domain.h" 45 | 46 | #endif // __LINBOX_test_generic_H 47 | 48 | // Local Variables: 49 | // mode: C++ 50 | // tab-width: 4 51 | // indent-tabs-mode: nil 52 | // c-basic-offset: 4 53 | // End: 54 | // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s 55 | -------------------------------------------------------------------------------- /tests/test-random-matrix.C: -------------------------------------------------------------------------------- 1 | #include "linbox/linbox-config.h" 2 | #include "linbox/matrix/matrix-domain.h" 3 | #include "linbox/solutions/rank.h" 4 | #include "linbox/matrix/random-matrix.h" 5 | 6 | using namespace LinBox; 7 | 8 | 9 | bool testPrimeField(int p, int n, int m) 10 | { 11 | typedef Givaro::Modular Field; 12 | typedef MatrixDomain Domain; 13 | typedef typename Domain::OwnMatrix Matrix; 14 | typedef typename Field::RandIter RandIter; 15 | 16 | Field F(p); 17 | Matrix M(F,n,m); 18 | RandIter RI(F); 19 | RandomDenseMatrix RDM(F,RI); 20 | long unsigned r; 21 | 22 | RDM.randomFullRank(M); 23 | rank(r,M,Method::DenseElimination()); 24 | 25 | return r==(long unsigned)(ns,f0,{0,g0,(0,\:0,t0,+0,=s 52 | -------------------------------------------------------------------------------- /tests/test-weak-popov-form.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "linbox/ring/ntl.h" 6 | #include "linbox/algorithms/weak-popov-form.h" 7 | 8 | //#define LINBOX_USES_OMP 1 9 | #include "linbox/matrix/sparse-matrix.h" 10 | #include "linbox/matrix/dense-matrix.h" 11 | #include "linbox/matrix/matrix-domain.h" 12 | #include "linbox/matrix/random-matrix.h" 13 | 14 | using namespace LinBox; 15 | 16 | typedef NTL_zz_pX PolynomialRing; 17 | typedef typename PolynomialRing::Element Polynomial; 18 | 19 | typedef MatrixDomain PolyMatrixDom; 20 | typedef typename PolyMatrixDom::OwnMatrix Matrix; 21 | typedef WeakPopovFormDomain WeakPopovFormDom; 22 | 23 | bool writing = false; 24 | 25 | int main(int argc, char* argv[]) { 26 | 27 | // text is written to cout iff a command line arg is present 28 | if (argc > 1) writing = true; 29 | 30 | uint64_t p = 3; 31 | PolynomialRing R(p); 32 | PolyMatrixDom MD(R); 33 | WeakPopovFormDom PFD(R); 34 | 35 | Matrix M(R, 4, 4); 36 | M.setEntry(0, 1, R.one); 37 | M.setEntry(1, 1, R.one); 38 | M.setEntry(2, 1, R.one); 39 | M.setEntry(2, 2, R.one); 40 | 41 | Matrix V(R, 4, 1); 42 | V.setEntry(0, 0, R.one); 43 | V.setEntry(1, 0, R.one); 44 | V.setEntry(2, 0, R.one); 45 | V.setEntry(3, 0, R.one); 46 | 47 | if (writing) PFD.printMatrix(M); 48 | if (writing) std::cout << std::endl; 49 | 50 | std::vector pivots; 51 | PFD.findPivots(pivots, M); 52 | 53 | if (writing) std::cout << pivots << std::endl; 54 | 55 | std::pair match; 56 | bool matchFound = PFD.findMatchingPivots(match, pivots); 57 | 58 | if (writing) std::cout << (matchFound ? "true: " : "false: ") << match << std::endl; 59 | 60 | PFD.extendedSolve(M, V); 61 | 62 | if (writing) PFD.printMatrix(M); 63 | if (writing) std::cout << std::endl; 64 | 65 | if (writing) PFD.printMatrix(V); 66 | if (writing) std::cout << std::endl; 67 | 68 | Polynomial det; 69 | PFD.solveDet(det, M); 70 | 71 | return 0; 72 | } 73 | -------------------------------------------------------------------------------- /tests/test_leak.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | 3 | # Copyright (c) 2010 the LinBox group 4 | # written by Brice Boyer (briceboyer) 5 | # This file is part of LinBox 6 | # ========LICENCE======== 7 | # This file is part of the library LinBox. 8 | # 9 | # LinBox is free software: you can redistribute it and/or modify 10 | # it under the terms of the GNU Lesser General Public 11 | # License as published by the Free Software Foundation; either 12 | # version 2.1 of the License, or (at your option) any later version. 13 | # 14 | # This library is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | # Lesser General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU Lesser General Public 20 | # License along with this library; if not, write to the Free Software 21 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | # ========LICENCE======== 23 | #/ 24 | 25 | 26 | 27 | 28 | # fast check (pwd = linbox/tests ; make check ) 29 | # for i in `find ./ -executable -type f | grep -v benchmark` ; do valgrind $i ; done 2>&1 | less 30 | 31 | # doc : 32 | # recompiles a test-* and valgrinds it. 33 | 34 | if [ $# -ne 1 ] 35 | then 36 | echo "Usage: `basename $0` prog" 37 | exit -1 38 | fi 39 | 40 | if [ ! -f "${1}.C" ] 41 | then 42 | echo "not a test" 43 | exit -2 44 | fi 45 | 46 | if [ -f "${1}.o" ] 47 | then 48 | /bin/rm $1.o 49 | else 50 | echo "pas de $1.o" 51 | fi 52 | 53 | make $1 CXXFLAGS+="-O0 -g -DDEBUG" 54 | 55 | valgrind --leak-check=full --show-reachable=yes ./$1 56 | 57 | exit 0 58 | 59 | set -o nounset # Treat unset variables as an error 60 | 61 | 62 | -------------------------------------------------------------------------------- /tests/tests.doxy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) LinBox 3 | * 4 | * ========LICENCE======== 5 | * This file is part of the library LinBox. 6 | * 7 | * LinBox is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | * ========LICENCE======== 21 | 22 | */ 23 | 24 | /** \ingroup linbox 25 | * \defgroup tests tests 26 | * 27 | * \brief Correctness tests for LinBox components. 28 | * 29 | * These tests are to aid development and serve for unit and regression testing. 30 | * Some contain useful timing measurements. 31 | * 32 | * Do make fullcheck to try the lot. 33 | * See checker.C for more information on LinBox tests. 34 | * 35 | * There are some benchmarks. For instance benchmark-fields is intended to help 36 | * choose the most efficient field representation on a given platform. 37 | * 38 | */ 39 | 40 | // vim:syntax=doxygen 41 | --------------------------------------------------------------------------------