Package org.grouplens.lenskit.symbols

Examples of org.grouplens.lenskit.symbols.TypedSymbol


        MutableSparseVector result = new MutableSparseVector(mks, mvs);
        for (Map.Entry<Symbol, ImmutableSparseVector> entry : channelVectors.entrySet()) {
            result.addVectorChannel(entry.getKey(), entry.getValue().mutableCopy());
        }
        for (Entry<TypedSymbol<?>, Long2ObjectMap<?>> entry : channels.entrySet()) {
            TypedSymbol ts = entry.getKey();
            if (!ts.getType().equals(Double.class)) {
                Long2ObjectMap<?> val = entry.getValue();
                assert val instanceof TypedSideChannel;
                result.addChannel(ts, ((TypedSideChannel) val).mutableCopy());
            } else {
                assert result.hasChannel(ts);
View Full Code Here


                        @Override
                        public SymbolValue<?> apply(@Nullable Map.Entry<TypedSymbol<?>, List<?>> input) {
                            assert input != null;
                            Object obj = input.getValue().get(index);
                            if (obj != null) {
                                TypedSymbol sym = input.getKey();
                                assert sym.getType().isInstance(obj);
                                return sym.withValue(obj);
                            } else {
                                return null;
                            }
                        }
                    }).filter(Predicates.notNull())
View Full Code Here

TOP

Related Classes of org.grouplens.lenskit.symbols.TypedSymbol

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.