# Interface IPreferenceDataStore

Interface for the preference data store.

interface IPreferenceDataStore {
store(dataPoint: PreferenceDataPoint): void;
getAll(): readonly PreferenceDataPoint[];
getByDomain(domain: string): readonly PreferenceDataPoint[];
findSimilar(
features: QueryFeatures,
limit: number,
): readonly PreferenceDataPoint[];
getStats(): PreferenceModelStats;
clear(): void;
}

#### Implemented by

- InMemoryPreferenceStore

- Defined in packages/nexus-agents/src/cli-adapters/preference-router-types.ts:190

##### Index

### Methods

store
getAll
getByDomain
findSimilar
getStats
clear

## Methods

### store

- store(dataPoint: PreferenceDataPoint): void

  Store a new preference data point

  #### Parameters

  - dataPoint: PreferenceDataPoint

  #### Returns void

  - Defined in packages/nexus-agents/src/cli-adapters/preference-router-types.ts:192

### getAll

- getAll(): readonly PreferenceDataPoint[]

  Get all data points

  #### Returns readonly PreferenceDataPoint[]

  - Defined in packages/nexus-agents/src/cli-adapters/preference-router-types.ts:194

### getByDomain

- getByDomain(domain: string): readonly PreferenceDataPoint[]

  Get data points by domain

  #### Parameters

  - domain: string

  #### Returns readonly PreferenceDataPoint[]

  - Defined in packages/nexus-agents/src/cli-adapters/preference-router-types.ts:196

### findSimilar

- findSimilar(
  features: QueryFeatures,
  limit: number,
  ): readonly PreferenceDataPoint[]

  Find similar data points based on features

  #### Parameters

  - features: QueryFeatures
  - limit: number

  #### Returns readonly PreferenceDataPoint[]

  - Defined in packages/nexus-agents/src/cli-adapters/preference-router-types.ts:198

### getStats

- getStats(): PreferenceModelStats

  Get statistics

  #### Returns PreferenceModelStats

  - Defined in packages/nexus-agents/src/cli-adapters/preference-router-types.ts:200

### clear

- clear(): void

  Clear all data

  #### Returns void

  - Defined in packages/nexus-agents/src/cli-adapters/preference-router-types.ts:202