Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamicSparseArrays.PackedMemoryArray @show method incorrect #20

Closed
ItamarRocha opened this issue Mar 30, 2021 · 2 comments
Closed

DynamicSparseArrays.PackedMemoryArray @show method incorrect #20

ItamarRocha opened this issue Mar 30, 2021 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ItamarRocha
Copy link
Contributor

ItamarRocha commented Mar 30, 2021

Reproducing the bug:

using Coluna

struct FakeModel <: Coluna.ColunaBase.AbstractModel end

model = FakeModel()
Solution = Coluna.ColunaBase.Solution{FakeModel,Int,Float64}

dict_sol = Dict(1 => 2.0, 2 => 3.0, 3 => 4.0)
soldecs = [1,2,3]
solvals = [2.0,3.0,4.0]

primal_sol = Solution(model, soldecs, solvals, 0.0, Coluna.ColunaBase.FEASIBLE_SOL)

The show method for primal_sol in the example above give us the following output:

julia> primal_sol
Coluna.ColunaBase.Solution{FakeModel,Int64,Float64} with 3 entries:
  1 => 2.0
  2 => 3.0
  3 => 4.0

While the show method for the primal_sol.sol (type = DynamicSparseArrays.PackedMemoryArray) give us the memory that is not being used too.

julia> primal_sol.sol
8-element DynamicSparseArrays.PackedMemoryArray{Int64,Float64,DynamicSparseArrays.NoPredictor}:
 2.0
 3.0
 4.0
 0.0
 0.0
 0.0
 0.0
 0.0
@ItamarRocha ItamarRocha added the bug Something isn't working label Mar 30, 2021
@guimarqu guimarqu added the good first issue Good for newcomers label Apr 8, 2021
@guimarqu
Copy link
Contributor

guimarqu commented Apr 8, 2021

related to #1

@guimarqu
Copy link
Contributor

closed by #39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants