Questions tagged [vector]
A vector is a single-dimensional array: it contains components that can be accessed using an integral index. In some languages the size of a vector can grow or shrink as needed to accommodate adding and removing items after the Vector has been created. Use 'vector-graphics' for graphic display.
vector
35,329
questions
-3
votes
0
answers
51
views
Program ends abruptly iterating a 2-D vector using an iterator
I am updating a distance matrix which computes the distance between two nodes in an unweighted graph if the edge is present in the edges vector.
Edges is a 2-D vector with each element of size 2 where ...
0
votes
1
answer
49
views
Calculating angle between 3 points give weird result according pattern angle
I want to calculate the angle between two segments in 2D space. The two segments are defined by AB and BC.
The result of the calculation seems to vary according to the orientation of the vectors.
...
-2
votes
0
answers
37
views
Why Java shows strange characters when print a OptionalDouble? [duplicate]
I declared a OptionalDouble vector, and when the program print this give me strange characters instead of the vector values:
[[Ljava.util.OptionalDouble;@37bba4006. [[Ljava.util.OptionalDouble;@...
0
votes
0
answers
15
views
Android animatedVectorResource causes Resources$NotFoundException
I'm trying to use AnimatedImageVector.animatedVectorResource to display an animation in Compose, but every mentioned call causes an exception:
android.content.res.Resources$NotFoundException: Resource ...
0
votes
1
answer
61
views
Cannot add vector search to an Azure AI Search data source
I have two instances of Azure Open AI Studio. Each has a Chat. I created an instance of Azure AI Search and added a vector index to it.
Now I am adding data to my Chats. I select Azure AI Search as ...
0
votes
1
answer
35
views
Map loadstart event not firing with vector layers (openlayers)
I have a project in OpenLayers 8.2, where there are many types of layers in a map. As introduced in ol 6.14, I am using the 'loadstart' and 'loadend' events of the map object (https://openlayers.org/...
-1
votes
2
answers
78
views
RAG using Langchain / Chroma - Unable to save more than 99 Records to Database
I'm using the following code to load the content of markdown files (only one file, in my case), split it into chunks and then embed and store the chunks one by one. My file is split into 801 chunks. ...
0
votes
0
answers
8
views
Superbase similarity checker
I am trying to check for the already existing data in Superbas table the similarity with the input data, and it constantly gives me some problems in terminal console, so what can I do to Mae changes ...
-2
votes
0
answers
24
views
Python routine for most diverse vectors
I've N vectors, and the cosine similarity between all N*(N-1)/2 pairs. I need to select K vector pairs (of all vector pairs) such that difference between the pairs k(i)-k(i+1), i=1...K-1 is more or ...
-3
votes
1
answer
49
views
Rust iterator map callback issue "function is expected to take 1 argument, but it takes 3 arguments expected function that takes 1 argument"
This "do_work" function Need to insert 3 arguments, but only first argument is working. Please view image.
I also need to insert i2 and i3 variables.
Rust map callback issue - "...
1
vote
0
answers
36
views
How do I the head of a vector in matplotlib?
I'm plotting an entrance and output vector but the head of the vector is so big that is giving me some problems. Currently I'm using this code
ax.quiver(origins[i, 0], origins[i, 1], origins[i, 2],
...
1
vote
0
answers
48
views
Convert ordinal word string to ordinal number string? [duplicate]
Suppose I have a vector containing ordinal number words as strings in R:
ordinal_words<-c("FIRST COMPANY", "BAKERY FIFTH AVENUE", "WEST FORTIETH WAY")
I would like ...
1
vote
0
answers
47
views
Get compiler to notice exhaustive match on Vector
The following code defines an exhaustive match over a Vector, v.
def testExhaustiveness(v: Vector[Int]) = {
v match {
case Vector() => println("v is empty")
case ns :+ n => ...
0
votes
0
answers
30
views
Searching one document at a time from a vector store
In the context of my project, i'm making a chatbot that gives instructions to the user about the cv he uploaded (what to modify, what to add ...).
My current solution uses langchain since i want to ...
-1
votes
0
answers
26
views
Why isnt my x axis being updated when trying to move horizontally when jumping [duplicate]
import pygame
import AMaths
class Chr(pygame.sprite.Sprite):
def __init__(self, game):
super().__init__()
self.game = game
self.size = AMaths.Vector2(40, 40)
self.spawn = ...