dragonfly-ai / slash

Linear Algebra and Statistics library for Scala.js, JVM, and Native.
https://dragonfly-ai.github.io/slash/
Apache License 2.0
25 stars 4 forks source link

WIP : Index (don't merge!) #14

Closed Quafadas closed 1 year ago

Quafadas commented 1 year ago

This passes a bunch of tests which demonstrate indexing, and adding (dynamically sized) vectors together afterwards.

Index is a Array[Boolean] which stole the design notes from Vec.

The extra extension methods on Vec jump through a few little hoops to get everything compiling...

As a POC, it seems to work thus far ... to support the discussion at https://github.com/dragonfly-ai/slash/discussions/13

Quafadas commented 1 year ago

@dragonfly-ai I rebased this branch onto master, i.e. attempted to use the VectorSpace concept, and I couldn't figure out how to get it to become useful with indexes, for example.

Would you be willing to have a look and see if there is something I'm missing? This is as compile error, and I can't figure how how to make it not a compile error. https://github.com/Quafadas/vector/blob/index/tests/shared/src/test/scala/dynamic.scala#L44

Quafadas commented 1 year ago

I think we’re agreed this isn’t the direction of travel