Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Problem with Method References in 1.8

$
0
0

I built a library using the Processing library template with this source https://github.com/numenta/htm.java When I try to test the Network API that is included in htm.java in a Processing sketch I get an error that says Method references are allowed only at source level 1.8 or above. Here is the code for the sketch (the error occurs at FileSensor::create and Keys::path)

import org.numenta.nupic.*;

void setup(){
 size(400,400);
}

void net(){

  Parameters p = NetworkTestHarness.getParameters();
 p = p.union(NetworkTestHarness.getNetworkDemoTestEncoderParams());

Network network = Network.create("Network API Demo", p)
    .add(Network.createRegion("Region 1")
        .add(Network.createLayer("Layer 2/3", p)
            .alterParameter(Parameters.KEY.AUTO_CLASSIFY, Boolean.TRUE)
            .add(Anomaly.create())
            .add(new TemporalMemory())
            .add(new SpatialPooler()).add(Sensor.create(FileSensor::create, SensorParams.create(
                Keys::path, "", ResourceLocator.path("rec-center-hourly.csv")))));

        network.start();

}

My question is, is this a problem with Processing or something in Eclipse?


Viewing all articles
Browse latest Browse all 2896

Trending Articles