algorithm

package
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright (c) Ultraviolet SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	AlgoTypeBin    AlgorithType = "bin"
	AlgoTypePython AlgorithType = "python"
	AlgoTypeWasm   AlgorithType = "wasm"
	AlgoTypeDocker AlgorithType = "docker"
	AlgoTypeKey                 = "algo_type"
	AlgoArgsKey                 = "algo_args"

	ResultsDir     = "results"
	DatasetsDir    = "datasets"
	AlgoWorkingDir = "/cocos"
)

Variables

This section is empty.

Functions

func AlgorithmArgsFromContext added in v0.3.0

func AlgorithmArgsFromContext(ctx context.Context) []string

func AlgorithmArgsToContext added in v0.3.0

func AlgorithmArgsToContext(ctx context.Context, algoArgs []string) context.Context

func AlgorithmTypeFromContext

func AlgorithmTypeFromContext(ctx context.Context) string

func AlgorithmTypeToContext

func AlgorithmTypeToContext(ctx context.Context, algoType string) context.Context

Types

type AlgorithType

type AlgorithType string

type Algorithm

type Algorithm interface {
	// Run executes the algorithm and returns the result.
	Run() error

	// Stop stops the algorithm.
	Stop() error
}

Algorithm is an interface that specifies the API for an algorithm.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL