1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-27 01:10:28 +01:00

type parametrised create_product_matrix (works with Nemo)

This commit is contained in:
kalmar 2017-03-26 16:22:51 +02:00
parent 31393cab34
commit 9b07430b5e

View File

@ -1,9 +1,9 @@
using JuMP
import MathProgBase: AbstractMathProgSolver
function create_product_matrix(basis, limit)
function create_product_matrix{T}(basis::Vector{T}, limit)
product_matrix = zeros(Int, (limit,limit))
basis_dict = Dict{Array, Int}(x => i
basis_dict = Dict{T, Int}(x => i
for (i,x) in enumerate(basis))
for i in 1:limit
x_inv::eltype(basis) = inv(basis[i])