Skip to content

Introduce Vector abstraction #3194

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

Closed
wants to merge 5 commits into from
Closed

Introduce Vector abstraction #3194

wants to merge 5 commits into from

Conversation

mp911de
Copy link
Member

@mp911de mp911de commented Nov 4, 2024

A vector is a fixed-length array of non-null numeric values. Vectors are represent a point in a multidimensional space that is commonly used in machine learning and statistics.

Vector properties do not map cleanly to an existing class in the standard JDK Collections hierarchy. Vectors when used with embeddings (machine learning) represent an opaque point in the vector space that does not expose meaningful properties nor guarantees computational values to the outside world.

Recommended usage is in domain types:

class Article {
    
    Vector embedding;
}

Article article = new Article();
article.setEmbedding(Vector.of(embedding.getOutput()));

repositors.save(article);

Closes #3193

mp911de and others added 5 commits January 28, 2025 08:13
Refine object creation based on common element type to preserve comparison.
Also add shortcuts for empty sources and simplify copy calls that do not transform source values.
@mp911de mp911de self-assigned this Feb 4, 2025
@mp911de mp911de added this to the 3.5 M1 (2025.0.0) milestone Feb 4, 2025
mp911de added a commit that referenced this pull request Feb 4, 2025
Closes #3193
Original pull request: #3194
mp911de pushed a commit that referenced this pull request Feb 4, 2025
Also add shortcuts for empty sources and simplify copy calls that do not transform source values.

See #3193
Original pull request: #3194
mp911de added a commit that referenced this pull request Feb 4, 2025
Introduce empty constants to reduce allocations.

See #3193
Original pull request: #3194
@mp911de mp911de closed this Feb 4, 2025
@mp911de mp911de deleted the issue/3193 branch February 4, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce Vector abstraction
2 participants