<commit_before>/**
 * Copyright (C) 2010-12 Brookhaven National Laboratory
 * All rights reserved. Use is subject to license terms.
 */
package org.epics.pvmanager.graphene;

import org.epics.graphene.ScatterGraph2DRendererUpdate;
import org.epics.pvmanager.ReadFunction;
import org.epics.pvmanager.expression.DesiredRateExpression;
import org.epics.pvmanager.expression.DesiredRateExpressionImpl;
import org.epics.pvmanager.expression.DesiredRateExpressionList;
import org.epics.pvmanager.expression.DesiredRateExpressionListImpl;
import org.epics.vtype.VString;
import org.epics.vtype.VTable;

/**
 * @author shroffk
 *
 */
public class ScatterGraph2DExpression extends DesiredRateExpressionImpl<Graph2DResult> implements Graph2DExpression<ScatterGraph2DRendererUpdate> {

    public ScatterGraph2DExpression(DesiredRateExpressionList<?> childExpressions,
            ReadFunction<Graph2DResult> function, String defaultName) {
        super(childExpressions, function, defaultName);
    }

    public ScatterGraph2DExpression(DesiredRateExpression<? extends VTable> tableData,
	    DesiredRateExpression<? extends VString> xColumnName,
	    DesiredRateExpression<? extends VString> yColumnName,
	    DesiredRateExpression<? extends VString> tooltipColumnName) {
        super(new DesiredRateExpressionListImpl<>().and(tableData)
                .and(xColumnName).and(yColumnName).and(tooltipColumnName),
                new ScatterGraph2DTableFunction(tableData.getFunction(),
                xColumnName.getFunction(), yColumnName.getFunction(), tooltipColumnName.getFunction()),
                "Scatter Graph");
    }

    @Override
    public void update(ScatterGraph2DRendererUpdate update) {
        ((ScatterGraph2DFunction) getFunction()).getRendererUpdateQueue().writeValue(update);
    }

    @Override
    public ScatterGraph2DRendererUpdate newUpdate() {
        return new ScatterGraph2DRendererUpdate();
    }
}<commit_msg>graphene: fixed update for scatter graph<commit_after>/**
 * Copyright (C) 2010-12 Brookhaven National Laboratory
 * All rights reserved. Use is subject to license terms.
 */
package org.epics.pvmanager.graphene;

import org.epics.graphene.ScatterGraph2DRendererUpdate;
import org.epics.pvmanager.ReadFunction;
import org.epics.pvmanager.expression.DesiredRateExpression;
import org.epics.pvmanager.expression.DesiredRateExpressionImpl;
import org.epics.pvmanager.expression.DesiredRateExpressionList;
import org.epics.pvmanager.expression.DesiredRateExpressionListImpl;
import org.epics.vtype.VString;
import org.epics.vtype.VTable;

/**
 * @author shroffk
 *
 */
public class ScatterGraph2DExpression extends DesiredRateExpressionImpl<Graph2DResult> implements Graph2DExpression<ScatterGraph2DRendererUpdate> {

    public ScatterGraph2DExpression(DesiredRateExpressionList<?> childExpressions,
            ReadFunction<Graph2DResult> function, String defaultName) {
        super(childExpressions, function, defaultName);
    }

    public ScatterGraph2DExpression(DesiredRateExpression<? extends VTable> tableData,
	    DesiredRateExpression<? extends VString> xColumnName,
	    DesiredRateExpression<? extends VString> yColumnName,
	    DesiredRateExpression<? extends VString> tooltipColumnName) {
        super(new DesiredRateExpressionListImpl<>().and(tableData)
                .and(xColumnName).and(yColumnName).and(tooltipColumnName),
                new ScatterGraph2DTableFunction(tableData.getFunction(),
                xColumnName.getFunction(), yColumnName.getFunction(), tooltipColumnName.getFunction()),
                "Scatter Graph");
    }

    @Override
    public void update(ScatterGraph2DRendererUpdate update) {
        if (getFunction() instanceof ScatterGraph2DFunction) {
            ((ScatterGraph2DFunction) getFunction()).getRendererUpdateQueue().writeValue(update);
        }
        if (getFunction() instanceof ScatterGraph2DTableFunction) {
            ((ScatterGraph2DTableFunction) getFunction()).getRendererUpdateQueue().writeValue(update);
        }
    }

    @Override
    public ScatterGraph2DRendererUpdate newUpdate() {
        return new ScatterGraph2DRendererUpdate();
    }
}
{'fraction_non_alphanumeric': 0.08787515006002401, 'fraction_numerical': 0.009843937575030012, 'mean_word_length': 4.6603260869565215, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3877665', 'n_tokens_mistral': 1175, 'n_tokens_neox': 1124, 'n_words': 203}