6666@ Plugin (type = OpCollection .class )
6767public final class ConvertTypes <C extends ComplexType <C >, T extends IntegerType <T >> {
6868
69- @ OpField (names = "convert.bit" , params = "x" )
70- @ Parameter (key = "input" )
71- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
69+ @ OpField (names = "convert.bit" , params = "input, output" )
7270 public final Computers .Arity1 <C , BitType > complexToBit = (input , output ) -> output .set (input .getRealDouble () != 0 );
7371
74- @ OpField (names = "convert.bit" , params = "x" )
75- @ Parameter (key = "input" )
76- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
72+ @ OpField (names = "convert.bit" , params = "input, output" )
7773 public final Computers .Arity1 <T , BitType > integerToBit = (input , output ) -> output .set (input .getIntegerLong () != 0 );
7874
79- @ OpField (names = "convert.uint2" , params = "x" )
80- @ Parameter (key = "input" )
81- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
75+ @ OpField (names = "convert.uint2" , params = "input, output" )
8276 public final Computers .Arity1 <C , Unsigned2BitType > complexToUint2 = (input , output ) -> output .set ((long ) input .getRealDouble ());
8377
84- @ OpField (names = "convert.uint2" , params = "x" )
85- @ Parameter (key = "input" )
86- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
78+ @ OpField (names = "convert.uint2" , params = "input, output" )
8779 public final Computers .Arity1 <T , Unsigned2BitType > integerToUint2 = (input , output ) -> output .set (input .getIntegerLong ());
8880
89- @ OpField (names = "convert.uint4" , params = "x" )
90- @ Parameter (key = "input" )
91- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
81+ @ OpField (names = "convert.uint4" , params = "input, output" )
9282 public final Computers .Arity1 <C , Unsigned4BitType > complexToUint4 = (input , output ) -> output .set ((long ) input .getRealDouble ());
9383
94- @ OpField (names = "convert.uint4" , params = "x" )
95- @ Parameter (key = "input" )
96- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
84+ @ OpField (names = "convert.uint4" , params = "input, output" )
9785 public final Computers .Arity1 <T , Unsigned4BitType > integerToUint4 = (input , output ) -> output .set (input .getIntegerLong ());
9886
99- @ OpField (names = "convert.byte" , params = "x" )
100- @ Parameter (key = "input" )
101- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
87+ @ OpField (names = "convert.byte" , params = "input, output" )
10288 public final Computers .Arity1 <C , ByteType > complexToInt8 = (input , output ) -> output .set ((byte ) input .getRealDouble ());
10389
104- @ OpField (names = "convert.byte" , params = "x" )
105- @ Parameter (key = "input" )
106- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
90+ @ OpField (names = "convert.byte" , params = "input, output" )
10791 public final Computers .Arity1 <T , ByteType > integerToInt8 = (input , output ) -> output .set ((byte ) input .getIntegerLong ());
10892
109- @ OpField (names = "convert.uint8" , params = "x" )
110- @ Parameter (key = "input" )
111- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
93+ @ OpField (names = "convert.uint8" , params = "input, output" )
11294 public final Computers .Arity1 <C , UnsignedByteType > complexToUint8 = (input , output ) -> output .set ((int ) input .getRealDouble ());
11395
114- @ OpField (names = "convert.uint8" , params = "x" )
115- @ Parameter (key = "input" )
116- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
96+ @ OpField (names = "convert.uint8" , params = "input, output" )
11797 public final Computers .Arity1 <T , UnsignedByteType > integerToUint8 = (input , output ) -> output .set (input .getInteger ());
11898
119- @ OpField (names = "convert.uint12" , params = "x" )
120- @ Parameter (key = "input" )
121- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
99+ @ OpField (names = "convert.uint12" , params = "input, output" )
122100 public final Computers .Arity1 <C , Unsigned12BitType > complexToUint12 = (input , output ) -> output .set ((long ) input .getRealDouble ());
123101
124- @ OpField (names = "convert.uint12" , params = "x" )
125- @ Parameter (key = "input" )
126- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
102+ @ OpField (names = "convert.uint12" , params = "input, output" )
127103 public final Computers .Arity1 <T , Unsigned12BitType > integerToUint12 = (input , output ) -> output .set (input .getIntegerLong ());
128104
129- @ OpField (names = "convert.int16" , params = "x" )
130- @ Parameter (key = "input" )
131- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
105+ @ OpField (names = "convert.int16" , params = "input, output" )
132106 public final Computers .Arity1 <C , ShortType > complexToInt16 = (input , output ) -> output .set ((short ) input .getRealDouble ());
133107
134- @ OpField (names = "convert.int16" , params = "x" )
135- @ Parameter (key = "input" )
136- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
108+ @ OpField (names = "convert.int16" , params = "input, output" )
137109 public final Computers .Arity1 <T , ShortType > integerToInt16 = (input , output ) -> output .set ((short ) input .getIntegerLong ());
138110
139- @ OpField (names = "convert.uint16" , params = "x" )
140- @ Parameter (key = "input" )
141- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
111+ @ OpField (names = "convert.uint16" , params = "input, output" )
142112 public final Computers .Arity1 <C , UnsignedShortType > complexToUint16 = (input , output ) -> output .set ((int ) input .getRealDouble ());
143113
144- @ OpField (names = "convert.uint16" , params = "x" )
145- @ Parameter (key = "input" )
146- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
114+ @ OpField (names = "convert.uint16" , params = "input, output" )
147115 public final Computers .Arity1 <T , UnsignedShortType > integerToUint16 = (input , output ) -> output .set (input .getInteger ());
148116
149- @ OpField (names = "convert.int32" , params = "x" )
150- @ Parameter (key = "input" )
151- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
117+ @ OpField (names = "convert.int32" , params = "input, output" )
152118 public final Computers .Arity1 <C , IntType > complexToInt32 = (input , output ) -> output .set ((int ) input .getRealDouble ());
153119
154- @ OpField (names = "convert.int32" , params = "x" )
155- @ Parameter (key = "input" )
156- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
120+ @ OpField (names = "convert.int32" , params = "input, output" )
157121 public final Computers .Arity1 <T , IntType > integerToInt32 = (input , output ) -> output .set (input .getInteger ());
158122
159- @ OpField (names = "convert.uint32" , params = "x" )
160- @ Parameter (key = "input" )
161- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
123+ @ OpField (names = "convert.uint32" , params = "input, output" )
162124 public final Computers .Arity1 <C , UnsignedIntType > complexToUint32 = (input , output ) -> output .set ((long ) input .getRealDouble ());
163125
164- @ OpField (names = "convert.uint32" , params = "x" )
165- @ Parameter (key = "input" )
166- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
126+ @ OpField (names = "convert.uint32" , params = "input, output" )
167127 public final Computers .Arity1 <T , UnsignedIntType > integerToUint32 = (input , output ) -> output .set (input .getIntegerLong ());
168128
169- @ OpField (names = "convert.int64" , params = "x" )
170- @ Parameter (key = "input" )
171- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
129+ @ OpField (names = "convert.int64" , params = "input, output" )
172130 public final Computers .Arity1 <C , LongType > complexToInt64 = (input , output ) -> output .set ((long ) input .getRealDouble ());
173131
174- @ OpField (names = "convert.int64" , params = "x" )
175- @ Parameter (key = "input" )
176- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
132+ @ OpField (names = "convert.int64" , params = "input, output" )
177133 public final Computers .Arity1 <T , LongType > integerToInt64 = (input , output ) -> output .set (input .getIntegerLong ());
178134
179- @ OpField (names = "convert.uint64" , params = "x" )
180- @ Parameter (key = "input" )
181- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
135+ @ OpField (names = "convert.uint64" , params = "input, output" )
182136 public final Computers .Arity1 <C , UnsignedLongType > complexToUint64 = (input , output ) -> {
183137 final BigDecimal bd = BigDecimal .valueOf (input .getRealDouble ());
184138 final BigDecimal r = bd .remainder (BigDecimal .ONE );
@@ -189,9 +143,7 @@ public final class ConvertTypes<C extends ComplexType<C>, T extends IntegerType<
189143 }
190144 };
191145
192- @ OpField (names = "convert.uint128" , params = "x" )
193- @ Parameter (key = "input" )
194- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
146+ @ OpField (names = "convert.uint128" , params = "input, output" )
195147 public final Computers .Arity1 <C , Unsigned128BitType > complexToUint128 = (input , output ) -> {
196148 final BigDecimal bd = BigDecimal .valueOf (input .getRealDouble ());
197149 final BigDecimal r = bd .remainder (BigDecimal .ONE );
@@ -202,30 +154,20 @@ public final class ConvertTypes<C extends ComplexType<C>, T extends IntegerType<
202154 }
203155 };
204156
205- @ OpField (names = "convert.uint128" , params = "x" )
206- @ Parameter (key = "input" )
207- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
157+ @ OpField (names = "convert.uint128" , params = "input, output" )
208158 public final Computers .Arity1 <T , Unsigned128BitType > integerToUint128 = (input , output ) -> output .set (input .getBigInteger ());
209159
210- @ OpField (names = "convert.float32" , params = "x" )
211- @ Parameter (key = "input" )
212- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
160+ @ OpField (names = "convert.float32" , params = "input, output" )
213161 public final Computers .Arity1 <C , FloatType > complexToFloat32 = (input , output ) -> output .set (input .getRealFloat ());
214162
215- @ OpField (names = "convert.cfloat32" , params = "x" )
216- @ Parameter (key = "input" )
217- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
163+ @ OpField (names = "convert.cfloat32" , params = "input, output" )
218164 public final Computers .Arity1 <C , ComplexFloatType > complexToCfloat32 = (input , output ) -> output .set (input .getRealFloat (),
219165 input .getImaginaryFloat ());
220166
221- @ OpField (names = "convert.float64" , params = "x" )
222- @ Parameter (key = "input" )
223- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
167+ @ OpField (names = "convert.float64" , params = "input, output" )
224168 public final Computers .Arity1 <C , DoubleType > complexToFloat64 = (input , output ) -> output .set (input .getRealDouble ());
225169
226- @ OpField (names = "convert.cfloat64" , params = "x" )
227- @ Parameter (key = "input" )
228- @ Parameter (key = "output" , itemIO = ItemIO .BOTH )
170+ @ OpField (names = "convert.cfloat64" , params = "input, output" )
229171 public final Computers .Arity1 <C , ComplexDoubleType > complexToCfloat64 = (input , output ) -> output .set (input .getRealDouble (),
230172 input .getImaginaryDouble ());
231173}
0 commit comments