All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.linkedin.dagli.placeholder.internal.PlaceholderInternalAPI Maven / Gradle / Ivy

Go to download

DAG-oriented machine learning framework for bug-resistant, readable, efficient, maintainable and trivially deployable models in Java and other JVM languages

There is a newer version: 15.0.0-beta9
Show newest version
package com.linkedin.dagli.placeholder.internal;

import com.linkedin.dagli.producer.internal.RootProducerInternalAPI;
import com.linkedin.dagli.placeholder.Placeholder;
import java.util.ArrayList;
import java.util.List;


/**
 * Base interface for internal APIs of {@link Placeholder}s.
 * @param  the type of value supplied by the {@link Placeholder}
 * @param  the type of the {@link Placeholder}
 */
public interface PlaceholderInternalAPI> extends RootProducerInternalAPI {
  /**
   * Returns a list of new placeholders.
   *
   * @param count the number of placeholders to creat
   * @return the list of new placeholders
   */
  static List> createPlaceholderList(int count) {
    ArrayList> placeholders = new ArrayList<>(count);
    for (int i = 1; i <= count; i++) {
      placeholders.add(new Placeholder<>("Placeholder #" + i));
    }
    return placeholders;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy