vkostyukov / la4j

Linear Algebra for Java
http://la4j.org
Apache License 2.0
373 stars 109 forks source link

Added vector class documentation. #212

Closed sylvia43 closed 9 years ago

sylvia43 commented 9 years ago

I'm not completely sure on my understanding of MockVector. Also my explanation of a SparseVector is kinda ehh...

Refer to #208

sylvia43 commented 9 years ago

"Sorted array with a binary search on top of it" doesn't quite have the ring of "kinda like a HashMap"

sylvia43 commented 9 years ago

Is there a simpler way to describe that?

SamoylovMD commented 9 years ago

@anubiann00b just dont use word HashMap in docs - it's useful for understanding, but imprecise. CompressedVector is just a [index, element] storage, where indices are sorted.

sylvia43 commented 9 years ago

Yeah I looked at it, I think I get it now. Here's what I wrote:

CompressedVector stores the underlying data in a two arrays: A values array and a indices array. The values array matches the indices array, and they're both sorted by the indices array. To get a value at an index, the index is found in the indices array with a binary search and the respective value is obtained from the values array.

vkostyukov commented 9 years ago

@anubiann00b, I think this is perfect! Thanks!

sylvia43 commented 9 years ago

I copied it over because there's important information in the parent you want to be able to see in the child class. And I'll fix the spelling :P

sylvia43 commented 9 years ago

That build error was due to a connection timeout??

https://travis-ci.org/vkostyukov/la4j/jobs/43127650

vkostyukov commented 9 years ago

Sometimes TravisCI gone crazy. You can try to push another commit to force CI do its job again. For example, you can remove the TODO comment from the PR.

vkostyukov commented 9 years ago

TODO comment is here https://github.com/vkostyukov/la4j/pull/212/files#diff-d0b420cf1758b421305225d3f5b9aba7R633

sylvia43 commented 9 years ago

Did it. You can't manually force Travis to retry?

vkostyukov commented 9 years ago

Yeah. I don't think this is possible.

sylvia43 commented 9 years ago

I fixed #215 too, I'll PR that after this.

vkostyukov commented 9 years ago

Thanks! I'm merging this.

sylvia43 commented 9 years ago

Should this be modified?

vkostyukov commented 9 years ago

I would be definetelly nice to add these <p /> tags between paragraphs.

sylvia43 commented 9 years ago

Ok I'll get to that after merging.