Clarify undefined behavior when target == source in PMatrix::mult docs
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 85/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- documentation
Línea de trabajo
Lee el Javadoc de PMatrix.mult en core/src/processing/core/PMatrix.java, alrededor de las líneas 165–171. Aclara qué sucede cuando target y source son el mismo objeto y corrige la redacción que llama matriz al valor devuelto. El trabajo estará terminado cuando la documentación describa el comportamiento con precisión e identifique el valor devuelto como un PVector.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi folks!
I know this won't be top priority, but this issue caused me to spin my wheels for a couple days straight since it was one of those times where all my logic "looked right" after many passes so I figured it might throw some other beginners for a loop.
I'd like to request additional clarity be added to the javadoc here:
Specifically, I think that it should be stated explicitly that behavior is undefined when target == source. Since no warning was offered I did not expect for the contents of source to still be in the process of being read by the time that target is actually being populated within this method but it appears something like that is happening (my expectation was that the contents of source would have probably been extracted into local variables once at the beginning since there are so few elements in a PVector and then loaded into target once at the end after performing intermediate computations). Ideally, if there is no utility in allowing target == source whatsoever, this case should throw an exception but, alternatively, additional doc clarity would have been a noninvasive way of preventing prolonged confusion in my case. Also I think "target will then be the matrix returned" is a typo since this method is returning a PVector.
Here is an example sketch you can use to observe the undocumented undefined behavior. Move the mouse around without pressing anything to observe normal behavior when simply passing target = null. Similarly, pressing Right-click will set target equal to a PVector reference which is fixed across draw() frames--the outcome of which is normal behavior. Pressing Left-click will pass target = source triggering the undefined behavior.
Thanks!
- Lenguaje dominante
- Java
- Estrellas
- 527
- Forks
- 190
- Merge medio
- 1 d 4 h
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de processing/processing4
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
processing/processing4#1592 ·
-
`Processing lsp` never exits and leaves orphaned processesPosiblemente ocupada @overcast302 la tomó hace 24 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
processing/processing4#1578 · 2 comentarios · 1 reacción · 1 asignado ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
processing/processing4#1554 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
processing/processing4#1515 · 1 reacción ·
-
i got an UnsatisfiedLinkErrorAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
processing/processing4#1590 · 1 comentario ·
Todos los issues de processing/processing4
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Dans-Plugins/Medieval-Roleplay-Engine#396 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 6 días
-
Update spring-security to 7.1.3Abiertotype: dependency-upgrade
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
spring-projects/spring-session#4156 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
quarkiverse/quarkus-langchain4j#3127 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
HotswapProjects/HotswapAgent#688 ·