Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
Merge branch 'update-node-docs-306' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dstrande authored Sep 29, 2023
2 parents b1e4d03 + 2bd3560 commit c7c7617
Show file tree
Hide file tree
Showing 83 changed files with 4,422 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

[//]: # (Custom component imports)

import DocString from '@site/src/components/DocString';
import PythonCode from '@site/src/components/PythonCode';
import AppDisplay from '@site/src/components/AppDisplay';
import SectionBreak from '@site/src/components/SectionBreak';
import AppendixSection from '@site/src/components/AppendixSection';

[//]: # (Docstring)

import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt';
import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt';

<DocString>{DocstringSource}</DocString>
<PythonCode GLink='TRANSFORMERS/VECTOR_MANIPULATION/DECREMENT_ELEMENT/DECREMENT_ELEMENT.py'>{PythonSource}</PythonCode>

<SectionBreak />



[//]: # (Examples)

## Examples

import Example1 from './examples/EX1/example.md';
import App1 from '!!raw-loader!./examples/EX1/app.json';



<AppDisplay
nodeLabel='DECREMENT_ELEMENT'
appImg={''}
outputImg={''}
>
{App1}
</AppDisplay>

<Example1 />

<SectionBreak />



[//]: # (Appendix)

import Notes from './appendix/notes.md';
import Hardware from './appendix/hardware.md';
import Media from './appendix/media.md';

## Appendix

<AppendixSection index={0} folderPath='nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECREMENT_ELEMENT/appendix/'><Notes /></AppendixSection>
<AppendixSection index={1} folderPath='nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECREMENT_ELEMENT/appendix/'><Hardware /></AppendixSection>
<AppendixSection index={2} folderPath='nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECREMENT_ELEMENT/appendix/'><Media /></AppendixSection>


Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
The DECREMENT_ELEMENT node decrements the elements by the specified value from the Vector

Inputs
------
v : Vector
The input vector to decrement values from

Parameters
----------
value: int
the amount to decrement for each element

Returns
-------
Vector
The new vector with elements decremented from the input vector
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from flojoy import flojoy, Vector


@flojoy
def DECREMENT_ELEMENT(default: Vector, value: int) -> Vector:

v = default.v - value
return Vector(v=v)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No supporting screenshots, photos, or videos have been added to the media.md file for this node.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No theory or technical notes have been contributed for this node yet.
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
{
"rfInstance": {
"nodes": [
{
"width": 189,
"height": 160,
"id": "DECREMENT_ELEMENT-e0a0d8e5-abfb-49a9-87d2-a3eb72bc51a7",
"type": "TRANSFORMERS",
"data": {
"id": "DECREMENT_ELEMENT-e0a0d8e5-abfb-49a9-87d2-a3eb72bc51a7",
"label": "DECREMENT ELEMENT",
"func": "DECREMENT_ELEMENT",
"type": "TRANSFORMERS",
"ctrls": {
"value": {
"type": "int",
"default": null,
"desc": "the amount to decrement for each element",
"overload": null,
"functionName": "DECREMENT_ELEMENT",
"param": "value",
"value": 10
}
},
"initCtrls": {},
"inputs": [
{
"name": "default",
"id": "default",
"type": "Vector",
"multiple": false,
"desc": null
}
],
"outputs": [
{
"name": "default",
"id": "default",
"type": "Vector",
"desc": "The new vector with elements decremented from the input vector"
}
],
"path": "TRANSFORMERS/VECTOR_MANIPULATION/DECREMENT_ELEMENT/DECREMENT_ELEMENT.py",
"selected": false
},
"position": {
"x": -390.7392772694995,
"y": -117.40910900192941
},
"selected": false,
"positionAbsolute": {
"x": -390.7392772694995,
"y": -117.40910900192941
},
"dragging": true
},
{
"width": 208,
"height": 96,
"id": "LINSPACE-8ff41b80-9056-4a16-8762-e83ff2caef07",
"type": "GENERATORS",
"data": {
"id": "LINSPACE-8ff41b80-9056-4a16-8762-e83ff2caef07",
"label": "LINSPACE",
"func": "LINSPACE",
"type": "GENERATORS",
"ctrls": {
"start": {
"type": "float",
"default": 10,
"desc": "The start point of the data.",
"overload": null,
"functionName": "LINSPACE",
"param": "start",
"value": 0
},
"end": {
"type": "float",
"default": 0,
"desc": "The end point of the data.",
"overload": null,
"functionName": "LINSPACE",
"param": "end",
"value": 10
},
"step": {
"type": "int",
"default": 1000,
"desc": "The number of points in the vector.",
"overload": null,
"functionName": "LINSPACE",
"param": "step",
"value": 200
}
},
"initCtrls": {},
"inputs": [
{
"name": "default",
"id": "default",
"type": "Vector|OrderedPair",
"multiple": false,
"desc": "Optional input in case LINSPACE is used in a loop. Not used."
}
],
"outputs": [
{
"name": "default",
"id": "default",
"type": "Vector",
"desc": "v: the vector between start and end with step number of points."
}
],
"path": "GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py",
"selected": false
},
"position": {
"x": -774.3142250153708,
"y": -79.97150749393228
},
"selected": false,
"positionAbsolute": {
"x": -774.3142250153708,
"y": -79.97150749393228
},
"dragging": true
},
{
"width": 380,
"height": 293,
"id": "LINE-303388c3-a50f-4711-b016-d2f418047682",
"type": "VISUALIZERS",
"data": {
"id": "LINE-303388c3-a50f-4711-b016-d2f418047682",
"label": "LINE 1",
"func": "LINE",
"type": "VISUALIZERS",
"ctrls": {},
"initCtrls": {},
"inputs": [
{
"name": "default",
"id": "default",
"type": "OrderedPair|DataFrame|Matrix|Vector",
"multiple": false,
"desc": "the DataContainer to be visualized"
}
],
"outputs": [
{
"name": "default",
"id": "default",
"type": "Plotly",
"desc": "the DataContainer containing Plotly Line visualization of the input data"
}
],
"path": "VISUALIZERS/PLOTLY/LINE/LINE.py",
"selected": false
},
"position": {
"x": -104.3798137962579,
"y": 193.64952928447275
},
"selected": false,
"positionAbsolute": {
"x": -104.3798137962579,
"y": 193.64952928447275
},
"dragging": true
},
{
"width": 380,
"height": 293,
"id": "LINE-14c93ba8-3cfb-4164-8e64-0bdfcb133d48",
"type": "VISUALIZERS",
"data": {
"id": "LINE-14c93ba8-3cfb-4164-8e64-0bdfcb133d48",
"label": "LINE 1",
"func": "LINE",
"type": "VISUALIZERS",
"ctrls": {},
"initCtrls": {},
"inputs": [
{
"name": "default",
"id": "default",
"type": "OrderedPair|DataFrame|Matrix|Vector",
"multiple": false,
"desc": "the DataContainer to be visualized"
}
],
"outputs": [
{
"name": "default",
"id": "default",
"type": "Plotly",
"desc": "the DataContainer containing Plotly Line visualization of the input data"
}
],
"path": "VISUALIZERS/PLOTLY/LINE/LINE.py",
"selected": false
},
"position": {
"x": -84.2009396227668,
"y": -187.72300994460954
},
"selected": false,
"positionAbsolute": {
"x": -84.2009396227668,
"y": -187.72300994460954
},
"dragging": true
}
],
"edges": [
{
"source": "LINSPACE-8ff41b80-9056-4a16-8762-e83ff2caef07",
"sourceHandle": "default",
"target": "DECREMENT_ELEMENT-e0a0d8e5-abfb-49a9-87d2-a3eb72bc51a7",
"targetHandle": "default",
"id": "reactflow__edge-LINSPACE-8ff41b80-9056-4a16-8762-e83ff2caef07default-DECREMENT_ELEMENT-e0a0d8e5-abfb-49a9-87d2-a3eb72bc51a7default"
},
{
"source": "LINSPACE-8ff41b80-9056-4a16-8762-e83ff2caef07",
"sourceHandle": "default",
"target": "LINE-303388c3-a50f-4711-b016-d2f418047682",
"targetHandle": "default",
"id": "reactflow__edge-LINSPACE-8ff41b80-9056-4a16-8762-e83ff2caef07default-LINE-303388c3-a50f-4711-b016-d2f418047682default"
},
{
"source": "DECREMENT_ELEMENT-e0a0d8e5-abfb-49a9-87d2-a3eb72bc51a7",
"sourceHandle": "default",
"target": "LINE-14c93ba8-3cfb-4164-8e64-0bdfcb133d48",
"targetHandle": "default",
"id": "reactflow__edge-DECREMENT_ELEMENT-e0a0d8e5-abfb-49a9-87d2-a3eb72bc51a7default-LINE-14c93ba8-3cfb-4164-8e64-0bdfcb133d48default"
}
],
"viewport": {
"x": 637.654905587641,
"y": 363.60612546109087,
"zoom": 0.7111497425822767
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
In this example, we generate a vector by using a `LINSPACE` node. Then specify the value to decrement for each element in the vector with `DECREMENT_ELEMENT` node. The resulting vector is visualized with `LINE` node.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

[//]: # (Custom component imports)

import DocString from '@site/src/components/DocString';
import PythonCode from '@site/src/components/PythonCode';
import AppDisplay from '@site/src/components/AppDisplay';
import SectionBreak from '@site/src/components/SectionBreak';
import AppendixSection from '@site/src/components/AppendixSection';

[//]: # (Docstring)

import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt';
import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt';

<DocString>{DocstringSource}</DocString>
<PythonCode GLink='TRANSFORMERS/VECTOR_MANIPULATION/INCREMENT_ELEMENT/INCREMENT_ELEMENT.py'>{PythonSource}</PythonCode>

<SectionBreak />



[//]: # (Examples)

## Examples

import Example1 from './examples/EX1/example.md';
import App1 from '!!raw-loader!./examples/EX1/app.json';



<AppDisplay
nodeLabel='INCREMENT_ELEMENT'
appImg={''}
outputImg={''}
>
{App1}
</AppDisplay>

<Example1 />

<SectionBreak />



[//]: # (Appendix)

import Notes from './appendix/notes.md';
import Hardware from './appendix/hardware.md';
import Media from './appendix/media.md';

## Appendix

<AppendixSection index={0} folderPath='nodes/TRANSFORMERS/VECTOR_MANIPULATION/INCREMENT_ELEMENT/appendix/'><Notes /></AppendixSection>
<AppendixSection index={1} folderPath='nodes/TRANSFORMERS/VECTOR_MANIPULATION/INCREMENT_ELEMENT/appendix/'><Hardware /></AppendixSection>
<AppendixSection index={2} folderPath='nodes/TRANSFORMERS/VECTOR_MANIPULATION/INCREMENT_ELEMENT/appendix/'><Media /></AppendixSection>


Loading

0 comments on commit c7c7617

Please sign in to comment.