/** * Creates a new <code>TFloatArrayStack</code> instance with the * specified capacity. * * @param capacity the initial depth of the stack * @param no_entry_value value that represents null */ public TFloatArrayStack( int capacity, float no_entry_value ) { _list = new TFloatArrayList( capacity, no_entry_value ); }
/** * Creates a new <code>TFloatArrayStack</code> instance with the * specified capacity. * * @param capacity the initial depth of the stack */ public TFloatArrayStack( int capacity ) { _list = new TFloatArrayList( capacity ); }
VertexElements() { vertexCount = 0; normals = new TFloatArrayList(); vertices = new TFloatArrayList(); tex = new TFloatArrayList(); color = new TFloatArrayList(); indices = new TIntArrayList(); flags = new TIntArrayList(); } }
/** * Creates a new <code>TFloatArrayStack</code> instance that is * a copy of the instanced passed to us. * * @param stack the instance to copy */ public TFloatArrayStack( TFloatStack stack ) { if ( stack instanceof TFloatArrayStack ) { TFloatArrayStack array_stack = ( TFloatArrayStack ) stack; this._list = new TFloatArrayList( array_stack._list ); } else { throw new UnsupportedOperationException( "Only support TFloatArrayStack" ); } }
/** {@inheritDoc} */ public TFloatList subList( int begin, int end ) { if ( end < begin ) { throw new IllegalArgumentException( "end index " + end + " greater than begin index " + begin ); } if ( begin < 0 ) { throw new IndexOutOfBoundsException( "begin index can not be < 0" ); } if ( end > _data.length ) { throw new IndexOutOfBoundsException( "end index < " + _data.length ); } TFloatArrayList list = new TFloatArrayList( end - begin ); for ( int i = begin; i < end; i++ ) { list.add( _data[ i ] ); } return list; }
/** {@inheritDoc} */ public TFloatList grep( TFloatProcedure condition ) { TFloatArrayList list = new TFloatArrayList(); for ( int i = 0; i < _pos; i++ ) { if ( condition.execute( _data[ i ] ) ) { list.add( _data[ i ] ); } } return list; }
/** {@inheritDoc} */ public TFloatList inverseGrep( TFloatProcedure condition ) { TFloatArrayList list = new TFloatArrayList(); for ( int i = 0; i < _pos; i++ ) { if ( !condition.execute( _data[ i ] ) ) { list.add( _data[ i ] ); } } return list; }
@Override public TFloatList getAsFloatArray() { TFloatList result = new TFloatArrayList(size()); for (JsonElement element : array) { result.add(element.getAsFloat()); } return result; }
@Override public TFloatList getAsFloatArray() { if (data.getFloatCount() != 0) { TFloatList result = new TFloatArrayList(data.getFloatCount()); for (int i = 0; i < data.getFloatCount(); ++i) { result.add(data.getFloat(i)); } return result; } else { TFloatList result = new TFloatArrayList(data.getDoubleCount()); for (int i = 0; i < data.getDoubleCount(); ++i) { result.add((float) data.getDouble(i)); } return result; } }
protected void parseMeshData(Element rootElement) throws ColladaParseException { vertices = new TFloatArrayList(); texCoord0 = new TFloatArrayList(); texCoord1 = new TFloatArrayList(); normals = new TFloatArrayList(); colors = new TFloatArrayList(); indices = new TIntArrayList(); int vertCount = 0;
IFeatureAlphabet newfeat = new StringFeatureAlphabet(); cl.getAlphabetFactory().setDefaultFeatureAlphabet(newfeat); TFloatArrayList ww = new TFloatArrayList(); float[] vars = new float[idx.length]; float[] entropy = new float[idx.length];
for (int i = 0; i < posize; i++) { nweights[i] = models[i].getWeights(); ww[i] = new TFloatArrayList();
HashFeatureAlphabet newfeat = new HashFeatureAlphabet(); cl.getAlphabetFactory().setDefaultFeatureAlphabet(newfeat); TFloatArrayList ww = new TFloatArrayList(); for (int i = 0; i < idx.length; i++) { int base = idx[i]; //一个特征段起始位置
/** * Creates a new <code>TFloatArrayStack</code> instance with the * specified capacity. * * @param capacity the initial depth of the stack * @param no_entry_value value that represents null */ public TFloatArrayStack( int capacity, float no_entry_value ) { _list = new TFloatArrayList( capacity, no_entry_value ); }
/** * Creates a new <code>TFloatArrayStack</code> instance with the * specified capacity. * * @param capacity the initial depth of the stack */ public TFloatArrayStack( int capacity ) { _list = new TFloatArrayList( capacity ); }
/** * Creates a new <code>TFloatArrayStack</code> instance with the * specified capacity. * * @param capacity the initial depth of the stack */ public TFloatArrayStack( int capacity ) { _list = new TFloatArrayList( capacity ); }
/** * Extract the first values from a list of pairs. * * @param data the data * @return extracted first values */ public static gnu.trove.list.array.TFloatArrayList getFirst(Iterable<FloatIntPair> data) { gnu.trove.list.array.TFloatArrayList extracted = new gnu.trove.list.array.TFloatArrayList(); for (FloatIntPair item : data) extracted.add(item.first); return extracted; }
/** * Extract the first values from a list of pairs. * * @param data the data * @return extracted first values */ public static gnu.trove.list.array.TFloatArrayList getFirst(Iterable<FloatBytePair> data) { gnu.trove.list.array.TFloatArrayList extracted = new gnu.trove.list.array.TFloatArrayList(); for (FloatBytePair item : data) extracted.add(item.first); return extracted; }
/** * Extract the second values from a list of pairs. * * @param data the data * @return extracted second values */ public static gnu.trove.list.array.TFloatArrayList getSecond(Iterable<FloatFloatPair> data) { gnu.trove.list.array.TFloatArrayList extracted = new gnu.trove.list.array.TFloatArrayList(); for (FloatFloatPair item : data) extracted.add(item.second); return extracted; }
/** {@inheritDoc} */ public TFloatList inverseGrep( TFloatProcedure condition ) { TFloatArrayList list = new TFloatArrayList(); for ( int i = 0; i < _pos; i++ ) { if ( !condition.execute( _data[ i ] ) ) { list.add( _data[ i ] ); } } return list; }