algorithm

package
v0.0.0-...-dfa5874 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_algorithm_proto protoreflect.FileDescriptor

Functions

func RegisterAlgorithmServiceServer

func RegisterAlgorithmServiceServer(s *grpc.Server, srv AlgorithmServiceServer)

Types

type AlgorithmItem

type AlgorithmItem struct {
	ID    string  `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`         //item id
	Score float64 `protobuf:"fixed64,2,opt,name=Score,proto3" json:"Score,omitempty"` //打分值
	// contains filtered or unexported fields
}

func (*AlgorithmItem) Descriptor deprecated

func (*AlgorithmItem) Descriptor() ([]byte, []int)

Deprecated: Use AlgorithmItem.ProtoReflect.Descriptor instead.

func (*AlgorithmItem) GetID

func (x *AlgorithmItem) GetID() string

func (*AlgorithmItem) GetScore

func (x *AlgorithmItem) GetScore() float64

func (*AlgorithmItem) ProtoMessage

func (*AlgorithmItem) ProtoMessage()

func (*AlgorithmItem) ProtoReflect

func (x *AlgorithmItem) ProtoReflect() protoreflect.Message

func (*AlgorithmItem) Reset

func (x *AlgorithmItem) Reset()

func (*AlgorithmItem) String

func (x *AlgorithmItem) String() string

type AlgorithmServiceClient

type AlgorithmServiceClient interface {
	//基于用户的协同过滤,返回相似用户列表
	UserCF(ctx context.Context, in *UserCFReq, opts ...grpc.CallOption) (*UserCFRsp, error)
	//基于Item的协同过滤,返回相似Item列表
	ItemCF(ctx context.Context, in *ItemCFReq, opts ...grpc.CallOption) (*ItemCFRsp, error)
}

AlgorithmServiceClient is the client API for AlgorithmService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type AlgorithmServiceServer

type AlgorithmServiceServer interface {
	//基于用户的协同过滤,返回相似用户列表
	UserCF(context.Context, *UserCFReq) (*UserCFRsp, error)
	//基于Item的协同过滤,返回相似Item列表
	ItemCF(context.Context, *ItemCFReq) (*ItemCFRsp, error)
}

AlgorithmServiceServer is the server API for AlgorithmService service.

type ItemCFReq

type ItemCFReq struct {
	Items []*AlgorithmItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*ItemCFReq) Descriptor deprecated

func (*ItemCFReq) Descriptor() ([]byte, []int)

Deprecated: Use ItemCFReq.ProtoReflect.Descriptor instead.

func (*ItemCFReq) GetItems

func (x *ItemCFReq) GetItems() []*AlgorithmItem

func (*ItemCFReq) ProtoMessage

func (*ItemCFReq) ProtoMessage()

func (*ItemCFReq) ProtoReflect

func (x *ItemCFReq) ProtoReflect() protoreflect.Message

func (*ItemCFReq) Reset

func (x *ItemCFReq) Reset()

func (*ItemCFReq) String

func (x *ItemCFReq) String() string

type ItemCFRsp

type ItemCFRsp struct {
	RelatedItems []*AlgorithmItem `protobuf:"bytes,1,rep,name=relatedItems,proto3" json:"relatedItems,omitempty"` //相关item
	// contains filtered or unexported fields
}

func (*ItemCFRsp) Descriptor deprecated

func (*ItemCFRsp) Descriptor() ([]byte, []int)

Deprecated: Use ItemCFRsp.ProtoReflect.Descriptor instead.

func (*ItemCFRsp) GetRelatedItems

func (x *ItemCFRsp) GetRelatedItems() []*AlgorithmItem

func (*ItemCFRsp) ProtoMessage

func (*ItemCFRsp) ProtoMessage()

func (*ItemCFRsp) ProtoReflect

func (x *ItemCFRsp) ProtoReflect() protoreflect.Message

func (*ItemCFRsp) Reset

func (x *ItemCFRsp) Reset()

func (*ItemCFRsp) String

func (x *ItemCFRsp) String() string

type UnimplementedAlgorithmServiceServer

type UnimplementedAlgorithmServiceServer struct {
}

UnimplementedAlgorithmServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedAlgorithmServiceServer) ItemCF

func (*UnimplementedAlgorithmServiceServer) UserCF

type UserCFReq

type UserCFReq struct {
	UserId int32 `protobuf:"varint,1,opt,name=UserId,proto3" json:"UserId,omitempty"` //用户ID
	// contains filtered or unexported fields
}

func (*UserCFReq) Descriptor deprecated

func (*UserCFReq) Descriptor() ([]byte, []int)

Deprecated: Use UserCFReq.ProtoReflect.Descriptor instead.

func (*UserCFReq) GetUserId

func (x *UserCFReq) GetUserId() int32

func (*UserCFReq) ProtoMessage

func (*UserCFReq) ProtoMessage()

func (*UserCFReq) ProtoReflect

func (x *UserCFReq) ProtoReflect() protoreflect.Message

func (*UserCFReq) Reset

func (x *UserCFReq) Reset()

func (*UserCFReq) String

func (x *UserCFReq) String() string

type UserCFRsp

type UserCFRsp struct {
	RelatedUsers []string `protobuf:"bytes,1,rep,name=relatedUsers,proto3" json:"relatedUsers,omitempty"`
	// contains filtered or unexported fields
}

func (*UserCFRsp) Descriptor deprecated

func (*UserCFRsp) Descriptor() ([]byte, []int)

Deprecated: Use UserCFRsp.ProtoReflect.Descriptor instead.

func (*UserCFRsp) GetRelatedUsers

func (x *UserCFRsp) GetRelatedUsers() []string

func (*UserCFRsp) ProtoMessage

func (*UserCFRsp) ProtoMessage()

func (*UserCFRsp) ProtoReflect

func (x *UserCFRsp) ProtoReflect() protoreflect.Message

func (*UserCFRsp) Reset

func (x *UserCFRsp) Reset()

func (*UserCFRsp) String

func (x *UserCFRsp) String() string

Jump to

Keyboard shortcuts

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