add concat

This commit is contained in:
Daniel Martinek
2026-03-15 15:46:26 +01:00
parent 75a14df5d6
commit d5b8e3ccdb
11 changed files with 4180 additions and 2075 deletions
+2 -1
View File
@@ -158,7 +158,8 @@ You can also get the node from comfy manager under the name of More math.
- `shape(value)` : Returns the shape of a tensor as a list. If input is a list, returns lenght of the list as 1 value tensor. For numbers it returns empty list.
- `overlay(base, overlay, offset)`: Replaces a rectangular region of `base` with `overlay` starting at `offset`. Areas outside the base tensor are ignored. Overlay is cropped if it extends beyond the base tensor.
- `pad(tensor, padding)`: Pads a tensor with specified padding (pair for each dimension). For example, `[1,2,0,0]` adds 1 element before and 2 elements after in the first dimension, and no padding in the second dimension.
-
- `concatenate(tensor1, tensor2, dim)` or `concat` or `cat`: Concatenates two tensors along specified dimension. It things of everything as tensor.
### Advanced Tensor Operations
- `map(tensor, c1, ...)`: Remaps `tensor` using source coordinates.
+8 -6
View File
@@ -234,13 +234,14 @@ func5:
// N-argument functions
funcN:
SMIN LPAREN expr (COMMA expr)* RPAREN # SMinFunc
| SMAX LPAREN expr (COMMA expr)* RPAREN # SMaxFunc
| MAP LPAREN expr (COMMA expr)+ RPAREN # MapFunc
SMIN LPAREN expr (COMMA expr)* RPAREN # SMinFunc
| SMAX LPAREN expr (COMMA expr)* RPAREN # SMaxFunc
| MAP LPAREN expr (COMMA expr)+ RPAREN # MapFunc
| EZCONV LPAREN expr (COMMA expr)+ RPAREN # EzConvFunc
| CONV LPAREN expr (COMMA expr)+ RPAREN # ConvFunc
| PERM LPAREN expr COMMA expr RPAREN # PermuteFunc
| RESHAPE LPAREN expr COMMA expr RPAREN # ReshapeFunc;
| CONV LPAREN expr (COMMA expr)+ RPAREN # ConvFunc
| PERM LPAREN expr COMMA expr RPAREN # PermuteFunc
| RESHAPE LPAREN expr COMMA expr RPAREN # ReshapeFunc
| CONCAT LPAREN expr (COMMA expr)+ RPAREN # ConcatFunc;
funcNoise:
NOISE LPAREN expr (COMMA expr)? RPAREN # NoiseFunc
@@ -369,6 +370,7 @@ POP: 'stack_pop';
CLEAR: 'stack_clear';
HAS: 'stack_has';
GET: 'stack_get';
CONCAT: 'cat'|'concat'|'concatenate';
UPPER: 'upper';
LOWER: 'lower';
File diff suppressed because one or more lines are too long
+151 -150
View File
@@ -104,94 +104,95 @@ POP=103
CLEAR=104
HAS=105
GET=106
UPPER=107
LOWER=108
TRIM=109
SPLIT=110
JOIN=111
SUBSTRING=112
SUBSTR=113
FIND=114
REPLACE=115
DILATE=116
ERODE=117
MORPH_OPEN=118
MORPH_CLOSE=119
RGB_TO_HSV=120
HSV_TO_RGB=121
IF=122
ELSE=123
WHILE=124
FOR=125
IN=126
BREAK=127
CONTINUE=128
RETURN=129
TIMESTAMP=130
SORT=131
ARGSORT=132
ARGMIN=133
ARGMAX=134
SOFTMAX=135
SOFTMIN=136
UNIQUE=137
FLIP=138
COV=139
CORR=140
ENTROPY=141
CROP=142
NONE=143
NOISE=144
RAND=145
CAUCHY=146
EXPONENTIAL=147
LOGNORMAL=148
BERNOULLI=149
POISSON=150
GAMMADIST=151
BETADIST=152
LAPLACEDIST=153
GUMBELDIST=154
WEIBULLDIST=155
CHI2DIST=156
STUDENTTDIST=157
PERLIN=158
CELLULAR=159
PLASMA=160
PLUS=161
MINUS=162
MULT=163
DIV=164
MOD=165
POW=166
LSHIFT=167
RSHIFT=168
GE=169
GT=170
LE=171
LT=172
EQ=173
EQUEALS=174
NE=175
PIPE=176
LPAREN=177
RPAREN=178
COMMA=179
SEMICOLON=180
ARROW=181
LBRACKET=182
RBRACKET=183
QUESTION=184
COLON=185
LBRACE=186
RBRACE=187
NUMBER=188
CONSTANT=189
STRING=190
VARIABLE=191
SL_COMMENT=192
ML_COMMENT=193
WS=194
CONCAT=107
UPPER=108
LOWER=109
TRIM=110
SPLIT=111
JOIN=112
SUBSTRING=113
SUBSTR=114
FIND=115
REPLACE=116
DILATE=117
ERODE=118
MORPH_OPEN=119
MORPH_CLOSE=120
RGB_TO_HSV=121
HSV_TO_RGB=122
IF=123
ELSE=124
WHILE=125
FOR=126
IN=127
BREAK=128
CONTINUE=129
RETURN=130
TIMESTAMP=131
SORT=132
ARGSORT=133
ARGMIN=134
ARGMAX=135
SOFTMAX=136
SOFTMIN=137
UNIQUE=138
FLIP=139
COV=140
CORR=141
ENTROPY=142
CROP=143
NONE=144
NOISE=145
RAND=146
CAUCHY=147
EXPONENTIAL=148
LOGNORMAL=149
BERNOULLI=150
POISSON=151
GAMMADIST=152
BETADIST=153
LAPLACEDIST=154
GUMBELDIST=155
WEIBULLDIST=156
CHI2DIST=157
STUDENTTDIST=158
PERLIN=159
CELLULAR=160
PLASMA=161
PLUS=162
MINUS=163
MULT=164
DIV=165
MOD=166
POW=167
LSHIFT=168
RSHIFT=169
GE=170
GT=171
LE=172
LT=173
EQ=174
EQUEALS=175
NE=176
PIPE=177
LPAREN=178
RPAREN=179
COMMA=180
SEMICOLON=181
ARROW=182
LBRACKET=183
RBRACKET=184
QUESTION=185
COLON=186
LBRACE=187
RBRACE=188
NUMBER=189
CONSTANT=190
STRING=191
VARIABLE=192
SL_COMMENT=193
ML_COMMENT=194
WS=195
'sin'=1
'cos'=2
'tan'=3
@@ -275,65 +276,65 @@ WS=194
'stack_clear'=104
'stack_has'=105
'stack_get'=106
'upper'=107
'lower'=108
'trim'=109
'split'=110
'join'=111
'substring'=112
'substr'=113
'find'=114
'replace'=115
'dilate'=116
'erode'=117
'morph_open'=118
'morph_close'=119
'rgb_to_hsv'=120
'hsv_to_rgb'=121
'if'=122
'else'=123
'while'=124
'for'=125
'in'=126
'break'=127
'continue'=128
'return'=129
'timestamp'=130
'sort'=131
'argsort'=132
'argmin'=133
'argmax'=134
'softmax'=135
'softmin'=136
'unique'=137
'flip'=138
'cov'=139
'entropy'=141
'crop'=142
'+'=161
'-'=162
'*'=163
'/'=164
'%'=165
'^'=166
'<<'=167
'>>'=168
'>='=169
'>'=170
'<='=171
'<'=172
'=='=173
'='=174
'!='=175
'|'=176
'('=177
')'=178
','=179
';'=180
'->'=181
'['=182
']'=183
'?'=184
':'=185
'{'=186
'}'=187
'upper'=108
'lower'=109
'trim'=110
'split'=111
'join'=112
'substring'=113
'substr'=114
'find'=115
'replace'=116
'dilate'=117
'erode'=118
'morph_open'=119
'morph_close'=120
'rgb_to_hsv'=121
'hsv_to_rgb'=122
'if'=123
'else'=124
'while'=125
'for'=126
'in'=127
'break'=128
'continue'=129
'return'=130
'timestamp'=131
'sort'=132
'argsort'=133
'argmin'=134
'argmax'=135
'softmax'=136
'softmin'=137
'unique'=138
'flip'=139
'cov'=140
'entropy'=142
'crop'=143
'+'=162
'-'=163
'*'=164
'/'=165
'%'=166
'^'=167
'<<'=168
'>>'=169
'>='=170
'>'=171
'<='=172
'<'=173
'=='=174
'='=175
'!='=176
'|'=177
'('=178
')'=179
','=180
';'=181
'->'=182
'['=183
']'=184
'?'=185
':'=186
'{'=187
'}'=188
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+151 -150
View File
@@ -104,94 +104,95 @@ POP=103
CLEAR=104
HAS=105
GET=106
UPPER=107
LOWER=108
TRIM=109
SPLIT=110
JOIN=111
SUBSTRING=112
SUBSTR=113
FIND=114
REPLACE=115
DILATE=116
ERODE=117
MORPH_OPEN=118
MORPH_CLOSE=119
RGB_TO_HSV=120
HSV_TO_RGB=121
IF=122
ELSE=123
WHILE=124
FOR=125
IN=126
BREAK=127
CONTINUE=128
RETURN=129
TIMESTAMP=130
SORT=131
ARGSORT=132
ARGMIN=133
ARGMAX=134
SOFTMAX=135
SOFTMIN=136
UNIQUE=137
FLIP=138
COV=139
CORR=140
ENTROPY=141
CROP=142
NONE=143
NOISE=144
RAND=145
CAUCHY=146
EXPONENTIAL=147
LOGNORMAL=148
BERNOULLI=149
POISSON=150
GAMMADIST=151
BETADIST=152
LAPLACEDIST=153
GUMBELDIST=154
WEIBULLDIST=155
CHI2DIST=156
STUDENTTDIST=157
PERLIN=158
CELLULAR=159
PLASMA=160
PLUS=161
MINUS=162
MULT=163
DIV=164
MOD=165
POW=166
LSHIFT=167
RSHIFT=168
GE=169
GT=170
LE=171
LT=172
EQ=173
EQUEALS=174
NE=175
PIPE=176
LPAREN=177
RPAREN=178
COMMA=179
SEMICOLON=180
ARROW=181
LBRACKET=182
RBRACKET=183
QUESTION=184
COLON=185
LBRACE=186
RBRACE=187
NUMBER=188
CONSTANT=189
STRING=190
VARIABLE=191
SL_COMMENT=192
ML_COMMENT=193
WS=194
CONCAT=107
UPPER=108
LOWER=109
TRIM=110
SPLIT=111
JOIN=112
SUBSTRING=113
SUBSTR=114
FIND=115
REPLACE=116
DILATE=117
ERODE=118
MORPH_OPEN=119
MORPH_CLOSE=120
RGB_TO_HSV=121
HSV_TO_RGB=122
IF=123
ELSE=124
WHILE=125
FOR=126
IN=127
BREAK=128
CONTINUE=129
RETURN=130
TIMESTAMP=131
SORT=132
ARGSORT=133
ARGMIN=134
ARGMAX=135
SOFTMAX=136
SOFTMIN=137
UNIQUE=138
FLIP=139
COV=140
CORR=141
ENTROPY=142
CROP=143
NONE=144
NOISE=145
RAND=146
CAUCHY=147
EXPONENTIAL=148
LOGNORMAL=149
BERNOULLI=150
POISSON=151
GAMMADIST=152
BETADIST=153
LAPLACEDIST=154
GUMBELDIST=155
WEIBULLDIST=156
CHI2DIST=157
STUDENTTDIST=158
PERLIN=159
CELLULAR=160
PLASMA=161
PLUS=162
MINUS=163
MULT=164
DIV=165
MOD=166
POW=167
LSHIFT=168
RSHIFT=169
GE=170
GT=171
LE=172
LT=173
EQ=174
EQUEALS=175
NE=176
PIPE=177
LPAREN=178
RPAREN=179
COMMA=180
SEMICOLON=181
ARROW=182
LBRACKET=183
RBRACKET=184
QUESTION=185
COLON=186
LBRACE=187
RBRACE=188
NUMBER=189
CONSTANT=190
STRING=191
VARIABLE=192
SL_COMMENT=193
ML_COMMENT=194
WS=195
'sin'=1
'cos'=2
'tan'=3
@@ -275,65 +276,65 @@ WS=194
'stack_clear'=104
'stack_has'=105
'stack_get'=106
'upper'=107
'lower'=108
'trim'=109
'split'=110
'join'=111
'substring'=112
'substr'=113
'find'=114
'replace'=115
'dilate'=116
'erode'=117
'morph_open'=118
'morph_close'=119
'rgb_to_hsv'=120
'hsv_to_rgb'=121
'if'=122
'else'=123
'while'=124
'for'=125
'in'=126
'break'=127
'continue'=128
'return'=129
'timestamp'=130
'sort'=131
'argsort'=132
'argmin'=133
'argmax'=134
'softmax'=135
'softmin'=136
'unique'=137
'flip'=138
'cov'=139
'entropy'=141
'crop'=142
'+'=161
'-'=162
'*'=163
'/'=164
'%'=165
'^'=166
'<<'=167
'>>'=168
'>='=169
'>'=170
'<='=171
'<'=172
'=='=173
'='=174
'!='=175
'|'=176
'('=177
')'=178
','=179
';'=180
'->'=181
'['=182
']'=183
'?'=184
':'=185
'{'=186
'}'=187
'upper'=108
'lower'=109
'trim'=110
'split'=111
'join'=112
'substring'=113
'substr'=114
'find'=115
'replace'=116
'dilate'=117
'erode'=118
'morph_open'=119
'morph_close'=120
'rgb_to_hsv'=121
'hsv_to_rgb'=122
'if'=123
'else'=124
'while'=125
'for'=126
'in'=127
'break'=128
'continue'=129
'return'=130
'timestamp'=131
'sort'=132
'argsort'=133
'argmin'=134
'argmax'=135
'softmax'=136
'softmin'=137
'unique'=138
'flip'=139
'cov'=140
'entropy'=142
'crop'=143
'+'=162
'-'=163
'*'=164
'/'=165
'%'=166
'^'=167
'<<'=168
'>>'=169
'>='=170
'>'=171
'<='=172
'<'=173
'=='=174
'='=175
'!='=176
'|'=177
'('=178
')'=179
','=180
';'=181
'->'=182
'['=183
']'=184
'?'=185
':'=186
'{'=187
'}'=188
+282 -3
View File
@@ -1,4 +1,4 @@
# Generated from MathExpr.g4 by ANTLR 4.13.2
# Generated from ./MathExpr.g4 by ANTLR 4.13.2
from antlr4 import *
if "." in __name__:
from .MathExprParser import MathExprParser
@@ -521,6 +521,15 @@ class MathExprListener(ParseTreeListener):
pass
# Enter a parse tree produced by MathExprParser#StringExp.
def enterStringExp(self, ctx:MathExprParser.StringExpContext):
pass
# Exit a parse tree produced by MathExprParser#StringExp.
def exitStringExp(self, ctx:MathExprParser.StringExpContext):
pass
# Enter a parse tree produced by MathExprParser#ParenExp.
def enterParenExp(self, ctx:MathExprParser.ParenExpContext):
pass
@@ -1151,6 +1160,96 @@ class MathExprListener(ParseTreeListener):
pass
# Enter a parse tree produced by MathExprParser#ShapeFunc.
def enterShapeFunc(self, ctx:MathExprParser.ShapeFuncContext):
pass
# Exit a parse tree produced by MathExprParser#ShapeFunc.
def exitShapeFunc(self, ctx:MathExprParser.ShapeFuncContext):
pass
# Enter a parse tree produced by MathExprParser#UpperFunc.
def enterUpperFunc(self, ctx:MathExprParser.UpperFuncContext):
pass
# Exit a parse tree produced by MathExprParser#UpperFunc.
def exitUpperFunc(self, ctx:MathExprParser.UpperFuncContext):
pass
# Enter a parse tree produced by MathExprParser#LowerFunc.
def enterLowerFunc(self, ctx:MathExprParser.LowerFuncContext):
pass
# Exit a parse tree produced by MathExprParser#LowerFunc.
def exitLowerFunc(self, ctx:MathExprParser.LowerFuncContext):
pass
# Enter a parse tree produced by MathExprParser#TrimFunc.
def enterTrimFunc(self, ctx:MathExprParser.TrimFuncContext):
pass
# Exit a parse tree produced by MathExprParser#TrimFunc.
def exitTrimFunc(self, ctx:MathExprParser.TrimFuncContext):
pass
# Enter a parse tree produced by MathExprParser#EntropyFunc.
def enterEntropyFunc(self, ctx:MathExprParser.EntropyFuncContext):
pass
# Exit a parse tree produced by MathExprParser#EntropyFunc.
def exitEntropyFunc(self, ctx:MathExprParser.EntropyFuncContext):
pass
# Enter a parse tree produced by MathExprParser#SfftFunc.
def enterSfftFunc(self, ctx:MathExprParser.SfftFuncContext):
pass
# Exit a parse tree produced by MathExprParser#SfftFunc.
def exitSfftFunc(self, ctx:MathExprParser.SfftFuncContext):
pass
# Enter a parse tree produced by MathExprParser#DilateFunc.
def enterDilateFunc(self, ctx:MathExprParser.DilateFuncContext):
pass
# Exit a parse tree produced by MathExprParser#DilateFunc.
def exitDilateFunc(self, ctx:MathExprParser.DilateFuncContext):
pass
# Enter a parse tree produced by MathExprParser#ErodeFunc.
def enterErodeFunc(self, ctx:MathExprParser.ErodeFuncContext):
pass
# Exit a parse tree produced by MathExprParser#ErodeFunc.
def exitErodeFunc(self, ctx:MathExprParser.ErodeFuncContext):
pass
# Enter a parse tree produced by MathExprParser#MorphOpenFunc.
def enterMorphOpenFunc(self, ctx:MathExprParser.MorphOpenFuncContext):
pass
# Exit a parse tree produced by MathExprParser#MorphOpenFunc.
def exitMorphOpenFunc(self, ctx:MathExprParser.MorphOpenFuncContext):
pass
# Enter a parse tree produced by MathExprParser#MorphCloseFunc.
def enterMorphCloseFunc(self, ctx:MathExprParser.MorphCloseFuncContext):
pass
# Exit a parse tree produced by MathExprParser#MorphCloseFunc.
def exitMorphCloseFunc(self, ctx:MathExprParser.MorphCloseFuncContext):
pass
# Enter a parse tree produced by MathExprParser#PowFunc.
def enterPowFunc(self, ctx:MathExprParser.PowFuncContext):
pass
@@ -1277,6 +1376,15 @@ class MathExprListener(ParseTreeListener):
pass
# Enter a parse tree produced by MathExprParser#CorrFunc.
def enterCorrFunc(self, ctx:MathExprParser.CorrFuncContext):
pass
# Exit a parse tree produced by MathExprParser#CorrFunc.
def exitCorrFunc(self, ctx:MathExprParser.CorrFuncContext):
pass
# Enter a parse tree produced by MathExprParser#AppendFunc.
def enterAppendFunc(self, ctx:MathExprParser.AppendFuncContext):
pass
@@ -1421,6 +1529,51 @@ class MathExprListener(ParseTreeListener):
pass
# Enter a parse tree produced by MathExprParser#SplitFunc.
def enterSplitFunc(self, ctx:MathExprParser.SplitFuncContext):
pass
# Exit a parse tree produced by MathExprParser#SplitFunc.
def exitSplitFunc(self, ctx:MathExprParser.SplitFuncContext):
pass
# Enter a parse tree produced by MathExprParser#JoinFunc.
def enterJoinFunc(self, ctx:MathExprParser.JoinFuncContext):
pass
# Exit a parse tree produced by MathExprParser#JoinFunc.
def exitJoinFunc(self, ctx:MathExprParser.JoinFuncContext):
pass
# Enter a parse tree produced by MathExprParser#SubstringFunc.
def enterSubstringFunc(self, ctx:MathExprParser.SubstringFuncContext):
pass
# Exit a parse tree produced by MathExprParser#SubstringFunc.
def exitSubstringFunc(self, ctx:MathExprParser.SubstringFuncContext):
pass
# Enter a parse tree produced by MathExprParser#FindFunc.
def enterFindFunc(self, ctx:MathExprParser.FindFuncContext):
pass
# Exit a parse tree produced by MathExprParser#FindFunc.
def exitFindFunc(self, ctx:MathExprParser.FindFuncContext):
pass
# Enter a parse tree produced by MathExprParser#ReplaceFunc.
def enterReplaceFunc(self, ctx:MathExprParser.ReplaceFuncContext):
pass
# Exit a parse tree produced by MathExprParser#ReplaceFunc.
def exitReplaceFunc(self, ctx:MathExprParser.ReplaceFuncContext):
pass
# Enter a parse tree produced by MathExprParser#ClampFunc.
def enterClampFunc(self, ctx:MathExprParser.ClampFuncContext):
pass
@@ -1511,15 +1664,42 @@ class MathExprListener(ParseTreeListener):
pass
# Enter a parse tree produced by MathExprParser#sifftFunc.
# Enter a parse tree produced by MathExprParser#SifftFunc.
def enterSifftFunc(self, ctx:MathExprParser.SifftFuncContext):
pass
# Exit a parse tree produced by MathExprParser#sifftFunc.
# Exit a parse tree produced by MathExprParser#SifftFunc.
def exitSifftFunc(self, ctx:MathExprParser.SifftFuncContext):
pass
# Enter a parse tree produced by MathExprParser#OverlayFunc.
def enterOverlayFunc(self, ctx:MathExprParser.OverlayFuncContext):
pass
# Exit a parse tree produced by MathExprParser#OverlayFunc.
def exitOverlayFunc(self, ctx:MathExprParser.OverlayFuncContext):
pass
# Enter a parse tree produced by MathExprParser#RgbToHsvFunc.
def enterRgbToHsvFunc(self, ctx:MathExprParser.RgbToHsvFuncContext):
pass
# Exit a parse tree produced by MathExprParser#RgbToHsvFunc.
def exitRgbToHsvFunc(self, ctx:MathExprParser.RgbToHsvFuncContext):
pass
# Enter a parse tree produced by MathExprParser#HsvToRgbFunc.
def enterHsvToRgbFunc(self, ctx:MathExprParser.HsvToRgbFuncContext):
pass
# Exit a parse tree produced by MathExprParser#HsvToRgbFunc.
def exitHsvToRgbFunc(self, ctx:MathExprParser.HsvToRgbFuncContext):
pass
# Enter a parse tree produced by MathExprParser#SwapFunc.
def enterSwapFunc(self, ctx:MathExprParser.SwapFuncContext):
pass
@@ -1619,6 +1799,15 @@ class MathExprListener(ParseTreeListener):
pass
# Enter a parse tree produced by MathExprParser#ConcatFunc.
def enterConcatFunc(self, ctx:MathExprParser.ConcatFuncContext):
pass
# Exit a parse tree produced by MathExprParser#ConcatFunc.
def exitConcatFunc(self, ctx:MathExprParser.ConcatFuncContext):
pass
# Enter a parse tree produced by MathExprParser#NoiseFunc.
def enterNoiseFunc(self, ctx:MathExprParser.NoiseFuncContext):
pass
@@ -1682,5 +1871,95 @@ class MathExprListener(ParseTreeListener):
pass
# Enter a parse tree produced by MathExprParser#GammaDistFunc.
def enterGammaDistFunc(self, ctx:MathExprParser.GammaDistFuncContext):
pass
# Exit a parse tree produced by MathExprParser#GammaDistFunc.
def exitGammaDistFunc(self, ctx:MathExprParser.GammaDistFuncContext):
pass
# Enter a parse tree produced by MathExprParser#BetaDistFunc.
def enterBetaDistFunc(self, ctx:MathExprParser.BetaDistFuncContext):
pass
# Exit a parse tree produced by MathExprParser#BetaDistFunc.
def exitBetaDistFunc(self, ctx:MathExprParser.BetaDistFuncContext):
pass
# Enter a parse tree produced by MathExprParser#LaplaceDistFunc.
def enterLaplaceDistFunc(self, ctx:MathExprParser.LaplaceDistFuncContext):
pass
# Exit a parse tree produced by MathExprParser#LaplaceDistFunc.
def exitLaplaceDistFunc(self, ctx:MathExprParser.LaplaceDistFuncContext):
pass
# Enter a parse tree produced by MathExprParser#GumbelDistFunc.
def enterGumbelDistFunc(self, ctx:MathExprParser.GumbelDistFuncContext):
pass
# Exit a parse tree produced by MathExprParser#GumbelDistFunc.
def exitGumbelDistFunc(self, ctx:MathExprParser.GumbelDistFuncContext):
pass
# Enter a parse tree produced by MathExprParser#WeibullDistFunc.
def enterWeibullDistFunc(self, ctx:MathExprParser.WeibullDistFuncContext):
pass
# Exit a parse tree produced by MathExprParser#WeibullDistFunc.
def exitWeibullDistFunc(self, ctx:MathExprParser.WeibullDistFuncContext):
pass
# Enter a parse tree produced by MathExprParser#Chi2DistFunc.
def enterChi2DistFunc(self, ctx:MathExprParser.Chi2DistFuncContext):
pass
# Exit a parse tree produced by MathExprParser#Chi2DistFunc.
def exitChi2DistFunc(self, ctx:MathExprParser.Chi2DistFuncContext):
pass
# Enter a parse tree produced by MathExprParser#StudentTDistFunc.
def enterStudentTDistFunc(self, ctx:MathExprParser.StudentTDistFuncContext):
pass
# Exit a parse tree produced by MathExprParser#StudentTDistFunc.
def exitStudentTDistFunc(self, ctx:MathExprParser.StudentTDistFuncContext):
pass
# Enter a parse tree produced by MathExprParser#PerlinFunc.
def enterPerlinFunc(self, ctx:MathExprParser.PerlinFuncContext):
pass
# Exit a parse tree produced by MathExprParser#PerlinFunc.
def exitPerlinFunc(self, ctx:MathExprParser.PerlinFuncContext):
pass
# Enter a parse tree produced by MathExprParser#CellularFunc.
def enterCellularFunc(self, ctx:MathExprParser.CellularFuncContext):
pass
# Exit a parse tree produced by MathExprParser#CellularFunc.
def exitCellularFunc(self, ctx:MathExprParser.CellularFuncContext):
pass
# Enter a parse tree produced by MathExprParser#PlasmaFunc.
def enterPlasmaFunc(self, ctx:MathExprParser.PlasmaFuncContext):
pass
# Exit a parse tree produced by MathExprParser#PlasmaFunc.
def exitPlasmaFunc(self, ctx:MathExprParser.PlasmaFuncContext):
pass
del MathExprParser
File diff suppressed because it is too large Load Diff
+6 -1
View File
@@ -1,4 +1,4 @@
# Generated from MathExpr.g4 by ANTLR 4.13.2
# Generated from ./MathExpr.g4 by ANTLR 4.13.2
from antlr4 import *
if "." in __name__:
from .MathExprParser import MathExprParser
@@ -1004,6 +1004,11 @@ class MathExprVisitor(ParseTreeVisitor):
return self.visitChildren(ctx)
# Visit a parse tree produced by MathExprParser#ConcatFunc.
def visitConcatFunc(self, ctx:MathExprParser.ConcatFuncContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by MathExprParser#NoiseFunc.
def visitNoiseFunc(self, ctx:MathExprParser.NoiseFuncContext):
return self.visitChildren(ctx)
+1 -1
View File
@@ -20,7 +20,7 @@ const FUNCTIONS = new Set([
"bnot", "bitwise_not", "bitcount", "popcount", "popcnt", "shape", "band", "bitwise_and", "bxor", "bitwise_xor",
"bor", "bitwise_or", "tensor", "stack_push", "stack_pop", "stack_clear", "stack_has", "stack_get", "timestamp",
"sort", "argsort", "argmin", "argmax", "softmax", "softmin", "unique", "flip", "cov", "corr", "correlation", "entropy",
"crop",
"crop", "cat", "concatenate", "concat",
"noise", "randn", "random_normal", "rand", "randu", "random_uniform", "randc", "random_cauchy", "rande",
"random_exponential", "randln", "random_log_normal", "randb", "random_bernoulli", "randp", "random_poisson", "randg",
"random_gamma", "randbeta", "random_beta", "randl", "random_laplace", "randgumbel", "random_gumbel", "randw",